input: 
  import hashlib
  import json
  import time
  
  class Blockchain:
  
      def __init__(self):
          self.chain = []
          self.transactions = []
  
      def create_block(self, nonce: int, previous_hash: str) -> dict:
          """Creates a new block and adds it to the blockchain.
          >>> blockchain = Blockchain()
          >>> new_block = blockchain.create_block(12345, '0000000000000000000000000000000000000000000000000000000000000000')
          >>> new_block['block_number']
          1
          """
          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) -> int:
          """Returns the current timestamp in milliseconds.
          >>> blockchain = Blockchain()
          >>> isinstance(blockchain._current_timestamp(), int)
          True
          """
          return round(time.time() * 1000)
  
      def hash_block(self, block: dict) -> str:
          """Generates a SHA-256 hash of the given block.
          >>> blockchain = Blockchain()
          >>> sample_block = {'block_number': 1, 'timestamp': 1630497780000, 'nonce': 12345, 'previous_hash': '0000000000000000000000000000000000000000000000000000000000000000'}
          >>> blockchain.hash_block(sample_block)
          'a508165a3c77b6e7c1c79200e0ff11afa9e7921c3a09b8e1fb842b2dddd89ae3'
          """
          string_object = json.dumps(block, sort_keys=True)
          block_string = string_object.encode()
          raw_hash = hashlib.sha256(block_string)
          hex_hash = raw_hash.hexdigest()
          return hex_hash
  
output:     
      def add_transaction(self, sender: str, receiver: str, amount: float) -> int:
          """Adds a new transaction to the list of transactions.
          >>> blockchain = Blockchain()
          >>> blockchain.add_transaction('Alice', 'Bob', 10.5)
          1
          """
          transaction = {
              'sender': sender,
              'receiver': receiver,
              'amount': amount
          }
          self.transactions.append(transaction)
          return len(self.transactions)
  
      def get_previous_block(self) -> dict:
          """Returns the last block in the blockchain.
          >>> blockchain = Blockchain()
          >>> blockchain.create_block(12345, '0000000000000000000000000000000000000000000000000000000000000000')
          >>> blockchain.get_previous_block()['block_number']
          1
          """
          return self.chain[-1]
  
      def proof_of_work(self, previous_nonce: int) -> int:
          """Simple Proof of Work Algorithm.
          >>> blockchain = Blockchain()
          >>> blockchain.proof_of_work(12345)
          12346
          """
          new_nonce = 1
          check_proof = False
          while check_proof is False:
              hash_operation = hashlib.sha256(str(new_nonce**2 - previous_nonce**2).encode()).hexdigest()
              if hash_operation[:4] == '0000':
                  check_proof = True
              else:
                  new_nonce += 1
          return new_nonce
  