<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def CreateKey(self, private_key=None):
 """ Create a KeyPair Args: private_key (iterable_of_ints):
 (optional) 32 byte private key Returns: KeyPair: a KeyPair instance """

        if private_key is None:
            private_key = bytes(Random.get_random_bytes(32))

        key = KeyPair(priv_key=private_key)
        self._keys[key.PublicKeyHash.ToBytes()] = key
        return key