@combomethod<EOL><INDENT>def signHash(self, message_hash, private_key):<DEDENT>
msg_hash_bytes = HexBytes(message_hash)<EOL>if len(msg_hash_bytes) != <NUM_LIT:32>:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>key = self._parsePrivateKey(private_key)<EOL>(v, r, s, eth_signature_bytes) = sign_message_hash(key, msg_hash_bytes)<EOL>return AttributeDict({<EOL>'<STR_LIT>': msg_hash_bytes,<EOL>'<STR_LIT:r>': r,<EOL>'<STR_LIT:s>': s,<EOL>'<STR_LIT:v>': v,<EOL>'<STR_LIT>': HexBytes(eth_signature_bytes),<EOL>})<EOL>
Sign the hash provided.

.. WARNING:: *Never* sign a hash that you didn't generate,
    it can be an arbitrary transaction. For example, it might
    send all of your account's ether to an attacker.

If you would like compatibility with
:meth:`w3.eth.sign() <web3.eth.Eth.sign>`
you can use :meth:`~eth_account.messages.defunct_hash_message`.

Several other message standards are proposed, but none have a clear
consensus. You'll need to manually comply with any of those message standards manually.

:param message_hash: the 32-byte message hash to be signed
:type message_hash: hex str, bytes or int
:param private_key: the key to sign the message with
:type private_key: hex str, bytes, int or :class:`eth_keys.datatypes.PrivateKey`
:returns: Various details about the signature - most
  importantly the fields: v, r, and s
:rtype: ~eth_account.datastructures.AttributeDict

.. code-block:: python

    >>> msg = "I♥SF"
    >>> from eth_account.messages import defunct_hash_message
    >>> msghash = defunct_hash_message(text=msg)
    HexBytes('0x1476abb745d423bf09273f1afd887d951181d25adc66c4834a70491911b7f750')
    >>> key = "0xb25c7db31feed9122727bf0939dc769a96564b2de4c4726d035b36ecf1e5b364"
    >>> Account.signHash(msghash, key)
    {'messageHash': HexBytes('0x1476abb745d423bf09273f1afd887d951181d25adc66c4834a70491911b7f750'),  # noqa: E501
     'r': 104389933075820307925104709181714897380569894203213074526835978196648170704563,
     's': 28205917190874851400050446352651915501321657673772411533993420917949420456142,
     'signature': HexBytes('0xe6ca9bba58c88611fad66a6ce8f996908195593807c4b38bd528d2cff09d4eb33e5bfbbf4d3e39b1a2fd816a7680c19ebebaf3a141b239934ad43cb33fcec8ce1c'),  # noqa: E501
     'v': 28}

    # these are equivalent:
    >>> Account.signHash(
        0x1476abb745d423bf09273f1afd887d951181d25adc66c4834a70491911b7f750,
        key
    )
    >>> Account.signHash(
        "0x1476abb745d423bf09273f1afd887d951181d25adc66c4834a70491911b7f750",
        key
    )