input: 
  def create_basic_blockchain_system() -> str:
      """ Create a basic blockchain system in Python that includes a Block class 
      and a Blockchain class. The Block class should have an __init__ method that 
      initializes the block's index, timestamp, data, and previous_hash, and the 
      Blockchain class should have methods to add blocks and retrieve the entire 
      blockchain in JSON format.
      >>> create_basic_blockchain_system()
      '{"chain": []}'
      """
  
output:     
      import time
      import json
  
      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({"index": self.index, "timestamp": self.timestamp, "data": self.data, "previous_hash": self.previous_hash}, sort_keys=True).encode()
              return hashlib.sha256(block_string).hexdigest()
  
      class Blockchain:
          def __init__(self):
              self.chain = []
          
          def add_block(self, data):
              index = len(self.chain)
              timestamp = time.time()
              previous_hash = self.chain[-1].hash if self.chain else "0"
              new_block = Block(index, timestamp, data, previous_hash)
              self.chain.append(new_block)
          
          def get_chain(self):
              return json.dumps({"chain": [{"index": block.index, "timestamp": block.timestamp, "data": block.data, "previous_hash": block.previous_hash, "hash": block.hash} for block in self.chain]})
  
      blockchain = Blockchain()
      return blockchain.get_chain()
  