input: from typing import List, Dict
  
  def compose_basic_blockchain(data: List[Dict[str, str]]) -> str:
      """
      Compose a basic blockchain system in Python, given a list of JSON-formatted 'data' that includes
      'timestamp' and 'data' fields. The function will return the entire blockchain in JSON format
      with each block containing its 'index', 'timestamp', 'data', 'previous_hash' and 'hash'.
  
      >>> compose_basic_blockchain([{'timestamp': '2023-01-01 00:00:00', 'data': 'Genesis Block'}])
      '[{
          "index": 0,
          "timestamp": "2023-01-01 00:00:00",
          "data": "Genesis Block",
          "previous_hash": null,
          "hash": "a5a7e0990f976952cc55e6d72ebc56c8b6783bf2a3fee1ada0aaa4382c095d17"
      }]'
  
      >>> compose_basic_blockchain([
              {'timestamp': '2023-01-01 00:00:00', 'data': 'Genesis Block'},
              {'timestamp': '2023-01-01 00:01:00', 'data': 'Second Block'}
          ])
      '[{
          "index": 0,
          "timestamp": "2023-01-01 00:00:00",
          "data": "Genesis Block"],
          "previous_hash": null,
          "hash": "a5a7e0990f976952cc55e6d72ebc56c8b6783bf2a3fee1ada0aaa4382c095d17"
      }, {
          "index": 1,
          "timestamp": "2023-01-01 00:01:00",
          "data": "Second Block",
          "previous_hash": "a5a7e0990f976952cc55e6d72ebc56c8b6783bf2a3fee1ada0aaa4382c095d17",
          "hash": "aa8f93e1993a6cea199f3e6e80e296e8a2ef34fefbe7f2e4ab7a2e507db8e1b3"
      }]'
      """
      import hashlib
      import json
  
      def sha256(input_string):
          return hashlib.sha256(input_string.encode('utf-8')).hexdigest()
  
      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 = sha256(f'{self.index}{self.timestamp}{self.data}{self.previous_hash}')
  
      class Blockchain:
          def __init__(self):
              self.chain = []
  
          def add_block(self, data):
              previous_hash = self.chain[-1].hash if len(self.chain) > 0 else None
              block = Block(len(self.chain), data['timestamp'], data['data'], previous_hash)
              self.chain.append(block)
  
          def get_chain_json(self):
              return json.dumps([b.__dict__ for b in self.chain], indent=2)
  
      blockchain = Blockchain()
      for d in data:
          blockchain.add_block(d)
  
      return blockchain.get_chain_json()
output:     import hashlib
      import json
  
      def sha256(input_string):
          return hashlib.sha256(input_string.encode('utf-8')).hexdigest()
  
      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 = sha256(f'{self.index}{self.timestamp}{self.data}{self.previous_hash}')
  
      class Blockchain:
          def __init__(self):
              self.chain = []
  
          def add_block(self, data):
              previous_hash = self.chain[-1].hash if len(self.chain) > 0 else None
              block = Block(len(self.chain), data['timestamp'], data['data'], previous_hash)
              self.chain.append(block)
  
          def get_chain_json(self):
              return json.dumps([b.__dict__ for b in self.chain], indent=2)
  
      blockchain = Blockchain()
      for d in data:
          blockchain.add_block(d)
  
      return blockchain.get_chain_json()