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 methods to create blocks, record transactions, and hash blocks. For testing, ensure the function returns the expected block structure and hashed values.
  
  assert Blockchain._current_timestamp() > 0
  assert Blockchain().hash_block({'block_number': 1, 'timestamp': 1623180000000, 'nonce': 1, 'previous_hash': '0'})=='e68c0f6bb840a5b29dcda06d3d2ebdbf7e6e43d38e5d00fc73ac638cadd2ab4e'
  assert Blockchain().create_block(nonce=1, previous_hash='0')['block_number'] == 1
  assert len(Blockchain().chain) == 0
  assert len(Blockchain().transactions) == 0
output: class Blockchain:
      def __init__(self):
          self.chain = []
          self.transactions = []
          self.create_block(nonce=1, previous_hash='0')
  
      def _current_timestamp(self):
          return int(time.time() * 1000)
  
      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
          }
          self.transactions = []
          self.chain.append(block)
          return block
  
      def record_transaction(self, transaction):
          self.transactions.append(transaction)
  
      def hash_block(self, block):
          block_string = json.dumps(block, sort_keys=True).encode()
          return hashlib.sha256(block_string).hexdigest()