<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def sign(self, h, sig_format=SER_BINARY):
 """ Signs the message with SHA-512 hash `h' with this private key. """

        outlen = (self.curve.sig_len_compact if sig_format == SER_COMPACT
                  else self.curve.sig_len_bin)
        sig = self._ECDSA_sign(h)
        return serialize_number(sig, sig_format, outlen)