input: Write a function to create a basic blockchain in Python using only the core modules. Implement the Blockchain class with an initialization method, a method to create a block, a helper method to get the current timestamp, and a method to hash a block. The function should not take any input but should be able to create and add blocks to the blockchain.
  Blockchain class should include:
  - An __init__ method that initializes an empty list for the chain and another for transactions.
  - A create_block method that takes a nonce and a previous hash as arguments and creates a new block, appending it to the chain.
  - A _current_timestamp method that returns the current timestamp in milliseconds.
  - A hash_block method that takes a block as an argument and returns its hash in hexadecimal format.
  
  assert isinstance(Blockchain(), Blockchain)==True
  blockchain = Blockchain()
  block = blockchain.create_block(12345, '0')
  assert blockchain.chain[0]['block_number']==1
  assert len(blockchain.hash_block(block))==64
  assert blockchain.chain[0]['timestamp'] > 0
output: class Blockchain:
      def __init__(self):
          self.chain = []
          self.transactions = []
  
      def create_block(self, nonce, previous_hash):
          block = {
              'block_number': len(self.chain) + 1,
              'timestamp': self._current_timestamp(),
              'nonce': nonce,
              'previous_hash': previous_hash,
              'transactions': self.transactions.copy()
          }
          self.transactions.clear()
          self.chain.append(block)
          return block
  
      def _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()