input: from typing import List
  
  
  def create_blockchain(transactions: List[dict]) -> str:
      """
      Create a basic blockchain with given transactions. Each transaction should be a dictionary
      containing keys 'timestamp' and 'data'. The blockchain should be returned in JSON format.
      
      >>> transactions = [
      ...     {'timestamp': '2023-10-01T12:00:00Z', 'data': 'First transaction'},
      ...     {'timestamp': '2023-10-02T12:00:00Z', 'data': 'Second transaction'}
      ... ]
      >>> create_blockchain(transactions)
      '[
        {
          "index": 0,
          "timestamp": "2023-10-01T12:00:00Z",
          "data": "First transaction",
          "previous_hash": null,
          "hash": "6da7ad45a795b13dc85084d179e78902c957d9d6d95e02ea5be30acfc21dfd53"
        },
        {
          "index": 1,
          "timestamp": "2023-10-02T12:00:00Z",
          "data": "Second transaction",
          "previous_hash": "6da7ad45a795b13dc85084d179e78902c957d9d6d95e02ea5be30acfc21dfd53",
          "hash": "2a2d0a4fed24a2e4bfd615427a55ed158e17cffafa9627d3e6d29205f9b09a0b"
        }
      ]'
      """
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, transaction in enumerate(transactions):
          block = {
              "index": index,
              "timestamp": transaction['timestamp'],
              "data": transaction['data'],
              "previous_hash": previous_hash,
              "hash": calculate_hash(index, transaction['timestamp'], transaction['data'], previous_hash)
          }
          previous_hash = block['hash']
          blockchain.append(block)
  
      return json.dumps(blockchain, indent=2)