input: Write a function to create a basic blockchain in Python using only the core modules. The function should initialize the blockchain, allow the creation of new blocks with a nonce and previous hash, and also provide a method to hash a block. The function should be initialized as follows: 
  
  def create_blockchain():
      return Blockchain()
  
  assert type(create_blockchain())==Blockchain
  blockchain = create_blockchain()
  assert blockchain.create_block(nonce=1, previous_hash="00000000")["block_number"]==1
  hash_result = blockchain.hash_block(blockchain.chain[0])
  assert type(hash_result)==str
output: def create_blockchain():
      class Blockchain:
          def __init__(self):
              self.chain = []
              self.create_block(nonce=0, previous_hash="0")
  
          def create_block(self, nonce, previous_hash):
              block = {
                  "block_number": len(self.chain) + 1,
                  "nonce": nonce,
                  "previous_hash": previous_hash,
                  "timestamp": str(datetime.datetime.now())
              }
              self.chain.append(block)
              return block
  
          def hash_block(self, block):
              block_string = json.dumps(block, sort_keys=True).encode()
              return hashlib.sha256(block_string).hexdigest()
  
      return Blockchain()