input: def compose_blockchain():
      """
      Compose a basic blockchain system in Python. The blockchain consists of a series of blocks where each block contains an index, timestamp, data, and the hash of the previous block. The blockchain class allows adding new blocks and retrieving the entire blockchain in JSON format.
  
      Example:
      >>> bc = Blockchain()
      >>> bc.add_block({'timestamp': '2021-01-01 12:00:00', 'data': 'First block data'})
      >>> bc.add_block({'timestamp': '2021-01-02 12:00:00', 'data': 'Second block data'})
      >>> bc.get_chain() == '''[
          {
              "index": 0,
              "timestamp": "2021-01-01 12:00:00",
              "data": "First block data",
              "previous_hash": null,
              "hash": "hash_value_1"
          },
          {
              "index": 1,
              "timestamp": "2021-01-02 12:00:00",
              "data": "Second block data",
              "previous_hash": "hash_value_1",
              "hash": "hash_value_2"
          }
      ]'''
      True
      """
output:     
      import hashlib
      import json
      from time import time
  
      class Block:
          def __init__(self, index, timestamp, data, previous_hash):
              self.index = index
              self.timestamp = timestamp
              self.data = data
              self.previous_hash = previous_hash
              self.hash = self.calculate_hash()
  
          def calculate_hash(self):
              block_string = json.dumps({"index": self.index, "timestamp": self.timestamp, "data": self.data, "previous_hash": self.previous_hash}, sort_keys=True).encode()
              return hashlib.sha256(block_string).hexdigest()
  
      class Blockchain:
          def __init__(self):
              self.chain = [self.create_genesis_block()]
  
          def create_genesis_block(self):
              return Block(0, "2021-01-01 12:00:00", "Genesis Block", "0")
  
          def get_latest_block(self):
              return self.chain[-1]
  
          def add_block(self, data):
              latest_block = self.get_latest_block()
              new_block = Block(latest_block.index + 1, data['timestamp'], data['data'], latest_block.hash)
              self.chain.append(new_block)
  
          def get_chain(self):
              chain_data = []
              for block in self.chain:
                  chain_data.append({
                      "index": block.index,
                      "timestamp": block.timestamp,
                      "data": block.data,
                      "previous_hash": block.previous_hash,
                      "hash": block.hash
                  })
              return json.dumps(chain_data, indent=4)
  
      bc = Blockchain()
      bc.add_block({'timestamp': '2021-01-01 12:00:00', 'data': 'First block data'})
      bc.add_block({'timestamp': '2021-01-02 12:00:00', 'data': 'Second block data'})
      print(bc.get_chain() == '''[
          {
              "index": 0,
              "timestamp": "2021-01-01 12:00:00",
              "data": "First block data",
              "previous_hash": null,
              "hash": "hash_value_1"
          },
          {
              "index": 1,
              "timestamp": "2021-01-02 12:00:00",
              "data": "Second block data",
              "previous_hash": "hash_value_1",
              "hash": "hash_value_2"
          }
      ]''')
  