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, get the current timestamp, and hash a block. The function should return an instance of the Blockchain class.
  assert str(type(create_blockchain()))=="<class '__main__.Blockchain'>"
  assert create_blockchain().create_block(1, '0')['block_number']==1
  assert create_blockchain()._current_timestamp()<=round(time.time() * 1000)
  assert len(create_blockchain().hash_block({'block_number': 1, 'timestamp': 1622122361000, 'nonce': 1, 'previous_hash': '0'}))==64
output: class Blockchain:
      def __init__(self):
          self.chain = []
          self.create_block(1, '0')
  
      def create_block(self, nonce, previous_hash):
          block = {
              'block_number': len(self.chain) + 1,
              'timestamp': self._current_timestamp(),
              'nonce': nonce,
              'previous_hash': previous_hash
          }
          self.chain.append(block)
          return block
  
      def _current_timestamp(self):
          return round(time.time() * 1000)
  
      def hash_block(self, block):
          block_string = json.dumps(block, sort_keys=True).encode()
          return hashlib.sha256(block_string).hexdigest()
  
  def create_blockchain():
      return Blockchain()