input: def create_blockchain():
      """Compose a basic blockchain system in Python.
      The blockchain system should include a class for each block and a class for the blockchain itself.
      The Block class should inherit from the previous block's hash.
      The Blockchain class should have methods to add a new block to the chain and to get the entire blockchain in JSON format.
      
      Example:
      for blockchain = create_blockchain()
          and blockchain.add_block({'timestamp': '2022-01-01 00:00:00', 'data': 'First block data'})
          and blockchain.add_block({'timestamp': '2022-01-02 00:00:00', 'data': 'Second block data'})
      blockchain.get_chain() should return a JSON string similar to this:
      [
          {
              "index": 0,
              "timestamp": "2022-01-01 00:00:00",
              "data": "First block data",
              "previous_hash": null,
              "hash": "c4b8e1e8d652ef297eb7a3a132e9664598fc8e0d53c144dceda5e44b452cd7b6"
          },
          {
              "index": 1,
              "timestamp": "2022-01-02 00:00:00",
              "data": "Second block data",
              "previous_hash": "c4b8e1e8d652ef297eb7a3a132e9664598fc8e0d53c144dceda5e44b452cd7b6",
              "hash": "06a5e2662cd86ddc5f89c81a947864a74baed49d17d1f95f5587a7a1af5bbbfb"
          }
      ]
      """
output:     
      import hashlib
      import json
      from time import time
  
      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 = json.dumps(self.__dict__, sort_keys=True).encode()
              return hashlib.sha256(block_string).hexdigest()
  
      class Blockchain:
          def __init__(self):
              self.chain = [self.create_genesis_block()]
  
          def create_genesis_block(self):
              return Block(0, "2022-01-01 00:00:00", "Genesis Block", "0")
  
          def get_latest_block(self):
              return self.chain[-1]
  
          def add_block(self, data):
              latest_block = self.get_latest_block()
              new_block = Block(latest_block.index + 1, time(), data, latest_block.hash)
              self.chain.append(new_block)
  
          def get_chain(self):
              return json.dumps([block.__dict__ for block in self.chain], indent=4)
  
      def create_blockchain():
          return Blockchain()
  