'Create a signature for the Block and overwrite `self.signature`.
Args:
private_key (str): A private key corresponding to
`self.node_pubkey`.
Returns:
:class:`~.Block`'

def sign(self, private_key):

    block_body = self.to_dict()
    block_serialized = serialize(block_body['block'])
    private_key = PrivateKey(private_key)
    self.signature = private_key.sign(block_serialized.encode()).decode()
    return self
