input: def create_blockchain(initial_data: dict) -> 'Blockchain':
      """Compose a basic blockchain system in Python.
      The blockchain consists of a list of blocks where each block has an index, timestamp, data,
      and a hash that includes a reference to the previous block's hash.
  
      The function starts by defining a SHA256 hashing function and then proceeds to define a Block class
      and a Blockchain class. The Blockchain class has methods to add blocks and to return the blockchain
      in a JSON format.
  
      >>> test_data = {'timestamp': '2023-10-10T12:30:45', 'data': 'Genesis Block'}
      >>> chain = create_blockchain(test_data)
      >>> json.loads(chain.get_chain())[0]['data']
      'Genesis Block'
      """
output:     
      import hashlib
      import time
      import json
  
      def hash_function(data: str) -> str:
          return hashlib.sha256(data.encode()).hexdigest()
  
      class Block:
          def __init__(self, index: int, timestamp: str, data: dict, previous_hash: str):
              self.index = index
              self.timestamp = timestamp
              self.data = data
              self.previous_hash = previous_hash
              self.hash = self.calculate_hash()
  
          def calculate_hash(self) -> str:
              block_string = json.dumps({"index": self.index, "timestamp": self.timestamp, "data": self.data, "previous_hash": self.previous_hash}, sort_keys=True).encode()
              return hash_function(block_string.decode())
  
      class Blockchain:
          def __init__(self):
              self.chain = [self.create_genesis_block(initial_data)]
  
          def create_genesis_block(self, data: dict) -> Block:
              return Block(0, data['timestamp'], data['data'], "0")
  
          def add_block(self, data: dict):
              previous_block = self.chain[-1]
              new_index = previous_block.index + 1
              new_timestamp = time.strftime("%Y-%m-%dT%H:%M:%S", time.gmtime())
              new_block = Block(new_index, new_timestamp, data, previous_block.hash)
              self.chain.append(new_block)
  
          def get_chain(self) -> str:
              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)
  
      return Blockchain()
  