input: Write a function to implement a basic blockchain in Python using only the core modules. The function should create a Blockchain class with methods to initialize the blockchain, create a new block, get the current timestamp, and hash a block. The function should also include a test case to assert that the hashing of a block works correctly.
  assert Blockchain().hash_block({'block_number': 1, 'timestamp': 1627301234567, 'nonce': 23456, 'previous_hash': '0'})=="4e1f4d744638b9eece76ccf3eddd53a7e0c85119bd9e1ea2ec870d1a889a7c7d"
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() * 1000)
  
      def hash_block(self, block):
          block_string = json.dumps(block, sort_keys=True).encode()
          return hashlib.sha256(block_string).hexdigest()