input: Write a function to create a basic blockchain using only core Python modules. Implement a class named `Blockchain` with methods to initialize the chain, create a new block, and hash a block. The function should include a `create_block` method that appends a new block to the chain with details including `block_number`, `timestamp`, `nonce`, and `previous_hash`, and a `hash_block` method that returns the SHA-256 hash of a given block.
  
  assert Blockchain().create_block(54321, 'abcdef123456')['block_number'] == 1
  assert len(Blockchain().chain) == 0
  assert len(json.dumps(Blockchain().create_block(12345, 'fedcba654321'))) > 0
  assert Blockchain().hash_block({'block_number': 1, 'timestamp': 12345, 'nonce': 54321, 'previous_hash': 'abcdef123456'}).startswith('0')
output: 
  import time
  import hashlib
  
  class Blockchain:
      def __init__(self):
          self.chain = []
          self.create_block(nonce=1, previous_hash='0')
  
      def create_block(self, nonce, previous_hash):
          block = {
              'block_number': len(self.chain) + 1,
              'timestamp': time.time(),
              'nonce': nonce,
              'previous_hash': previous_hash
          }
          self.chain.append(block)
          return block
  
      def hash_block(self, block):
          block_string = str(block).encode()
          return hashlib.sha256(block_string).hexdigest()
  