input: Write a function to create a basic blockchain in Python using only the core modules. The function should define a class named `Blockchain` with methods to initialize the blockchain, create a new block, get the current timestamp, and hash a block. The function should also include assertions to test the creation of blocks and hashing functionality.
  assert create_blockchain().create_block(123, "0")['block_number'] == 1
  assert create_blockchain().hash_block({'block_number': 1, 'timestamp': 1234567890, 'nonce': 123, 'previous_hash': "0"}) == "b6a8b0c5478a4b06b4e7e943310f7d266a96246e5bf8e6e16091cd7e9848a6b5"
output: 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': self.get_current_timestamp(),
              'nonce': nonce,
              'previous_hash': previous_hash
          }
          self.chain.append(block)
          return block
  
      def get_current_timestamp(self):
          return int(time.time())
  
      def hash_block(self, block):
          block_string = json.dumps(block, sort_keys=True).encode()
          return hashlib.sha256(block_string).hexdigest()