code: def CreateKey(self, private_key=None):
          
          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
docs: Create a KeyPair
  
          Args:
              private_key (iterable_of_ints): (optional) 32 byte private key
  
          Returns:
              KeyPair: a KeyPair instance