input: def compose_blockchain_system() -> (sha256, Block, Blockchain):
      """Compose a basic blockchain system in Python. The system should include a function
      for generating SHA256 hashes, a class for representing blocks, and a class for
      representing the blockchain. The Block class should have attributes for index, timestamp,
      data, and previous_hash, and should automatically compute the block's hash. The
      Blockchain class should have a method to add blocks to the chain and a method to return
      the entire blockchain in JSON format.
      
      >>> blockchain = Blockchain()
      >>> blockchain.add_block({'timestamp': '2023-10-01 12:00:00', 'data': 'First Block'})
      >>> blockchain.add_block({'timestamp': '2023-10-02 12:00:00', 'data': 'Second Block'})
      >>> print(blockchain.get_chain())
      [
        {
          "index": 0,
          "timestamp": "2023-10-01 12:00:00",
          "data": "First Block",
          "previous_hash": null,
          "hash": "0f8b04f7e2c1f0e4c5c5c5c5c5c5c5c5c5c5c5c5c5c5c5c5c5c5c5c5c5c5c5c5"
        },
        {
          "index": 1,
          "timestamp": "2023-10-02 12:00:00",
          "data": "Second Block",
          "previous_hash": "0f8b04f7e2c1f0e4c5c5c5c5c5c5c5c5c5c5c5c5c5c5c5c5c5c5c5c5c5c5c5c5",
          "hash": "6f8b04f7e2c1f0e4c5c5c5c5c5c5c5c5c5c5c5c5c5c5c5c5c5c5c5c5c5c5c5c5"
        }
      ]
      """
output:     import hashlib
      import json
      from time import time
  
      def sha256(data: str) -> str:
          return hashlib.sha256(data.encode()).hexdigest()
  
      class Block:
          def __init__(self, index: int, timestamp: str, data: dict, previous_hash: str):
              self.index = index
              self.timestamp = timestamp
              self.data = data
              self.previous_hash = previous_hash
              self.hash = self.compute_hash()
  
          def compute_hash(self) -> str:
              block_string = json.dumps(self.__dict__, sort_keys=True).encode()
              return sha256(block_string.decode())
  
      class Blockchain:
          def __init__(self):
              self.chain = [self.create_genesis_block()]
  
          def create_genesis_block(self) -> Block:
              return Block(0, "2023-10-01 12:00:00", {"data": "Genesis Block"}, "0")
  
          def add_block(self, data: dict):
              previous_block = self.chain[-1]
              new_block = Block(previous_block.index + 1, data['timestamp'], data, previous_block.hash)
              self.chain.append(new_block)
  
          def get_chain(self) -> str:
              return json.dumps([block.__dict__ for block in self.chain], indent=2)
  
      return sha256, Block, Blockchain