input: Write a function to create a basic blockchain in Python using only the core modules. The function should include methods to initialize the blockchain, create a new block, and hash a block. Return the blockchain object. If the function is successful, the output should be an instance of the Blockchain class with the specified methods.
  assert isinstance(create_blockchain(), Blockchain)
  assert callable(create_blockchain().create_block)
  assert callable(create_blockchain().hash_block)
output: class Blockchain:
      def __init__(self):
          self.chain = []
          self.create_block(proof=1, previous_hash='0')
  
      def create_block(self, proof, previous_hash):
          block = {'index': len(self.chain) + 1,
                   'timestamp': str(datetime.datetime.now()),
                   'proof': proof,
                   'previous_hash': previous_hash}
          self.chain.append(block)
          return block
  
      def hash_block(self, block):
          encoded_block = json.dumps(block, sort_keys=True).encode()
          return hashlib.sha256(encoded_block).hexdigest()
  
  def create_blockchain():
      return Blockchain()