input: Write a function to create a basic blockchain in Python using only the core modules. The function should include a class named Blockchain with an initialization method to set up the chain and transactions. Additionally, it should have methods to create a block with a nonce and a previous hash, retrieve the current timestamp, and hash a block using SHA-256.
  assert create_blockchain()
  assert create_blockchain().chain == []
  assert create_blockchain().transactions == []
  assert isinstance(create_blockchain().create_block(nonce=0, previous_hash='0'), dict)
  assert isinstance(create_blockchain().hash_block({'block_number': 1, 'timestamp': 1609459200000, 'nonce': 0, 'previous_hash': '0'}), str)
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.get_current_timestamp(),
              'nonce': nonce,
              'previous_hash': previous_hash,
              'transactions': self.transactions
          }
          self.transactions = []
          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()