input: def blockchain_system():
      """ Compose a basic blockchain system in Python. The system includes a method to 
      add blocks to the blockchain and return the entire blockchain in JSON format.
      >>> blockchain = Blockchain()
      >>> blockchain.add_block({'timestamp': '2023-10-01', 'data': 'Block 1'})
      >>> blockchain.add_block({'timestamp': '2023-10-02', 'data': 'Block 2'})
      >>> blockchain.get_chain()
      '[
        {
          "index": 0,
          "timestamp": "2023-10-01",
          "data": "Block 1",
          "previous_hash": null,
          "hash": "..."
        },
        {
          "index": 1,
          "timestamp": "2023-10-02",
          "data": "Block 2",
          "previous_hash": "...",
          "hash": "..."
        }
      ]'
      """
      pass
output:     
      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 = f"{self.index}{self.timestamp}{self.data}{self.previous_hash}"
              return hashlib.sha256(block_string.encode()).hexdigest()
  
      class Blockchain:
          def __init__(self):
              self.chain = [self.create_genesis_block()]
  
          def create_genesis_block(self):
              return Block(0, "2023-10-01", "Genesis Block", "0")
  
          def get_latest_block(self):
              return self.chain[-1]
  
          def add_block(self, new_block):
              new_block.index = len(self.chain)
              new_block.previous_hash = self.get_latest_block().hash
              new_block.hash = new_block.calculate_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=2)
  
      import hashlib
      import json
  