def ecdsa_signature_normalize(self, raw_sig, check_only=False):
if check_only:<EOL><INDENT>sigout = ffi.NULL<EOL><DEDENT>else:<EOL><INDENT>sigout = ffi.new('<STR_LIT>')<EOL><DEDENT>result = lib.secp256k1_ecdsa_signature_normalize(<EOL>self.ctx, sigout, raw_sig)<EOL>return (bool(result), sigout if sigout != ffi.NULL else None)<EOL>
Check and optionally convert a signature to a normalized lower-S form.
If check_only is True then the normalized signature is not returned.

This function always return a tuple containing a boolean (True if
not previously normalized or False if signature was already
normalized), and the normalized signature. When check_only is True,
the normalized signature returned is always None.