input: from typing import List
  
  def compose_blockchain(blocks: List[dict]) -> str:
      """Compose a basic blockchain system in Python.
      A block consists of an index, timestamp, data, and a hash.
      Each new block is added to the blockchain using the provided data.
      Return the entire blockchain in JSON format.
      
      >>> compose_blockchain([{'timestamp': '2023-10-10 12:00', 'data': 'First block'}])
      '[{"index": 0, "timestamp": "2023-10-10 12:00", "data": "First block", "previous_hash": null, "hash": "6b21c5ba4c7ef456c58ba9fe28d6d6deac5fa9def8efa8ee0fa93f8451ca41bd"}]'
      """
output:     import json
      import hashlib
  
      def calculate_hash(index, timestamp, data, previous_hash):
          block_string = f"{index}{timestamp}{data}{previous_hash}"
          return hashlib.sha256(block_string.encode()).hexdigest()
  
      blockchain = []
      previous_hash = None
  
      for index, block in enumerate(blocks):
          block_hash = calculate_hash(index, block['timestamp'], block['data'], previous_hash)
          blockchain.append({
              'index': index,
              'timestamp': block['timestamp'],
              'data': block['data'],
              'previous_hash': previous_hash,
              'hash': block_hash
          })
          previous_hash = block_hash
  
      return json.dumps(blockchain)