input: 
  import hashlib
  import json
  
  # This function will hash the given data using SHA256
  def sha256(data):
      hash_function = hashlib.sha256()
      hash_function.update(data.encode('utf-8'))
      return hash_function.hexdigest()
  
  # Create a class for each block in the blockchain
  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 = sha265(f'{index}{timestamp}{data}{previous_hash}')
  
  # Create a class for the blockchain
  class Blockchain:
      def __init__(self):
          self.chain = []
      
      # This method will add a new block to the blockchain
      def add_block(self, data):
          previous_hash = self.chain[-1].hash if len(self.chain) > 0 else None
          block = Block(len(self.chain), data['timestamp'], data['data'], previous_hash)
          self.chain.append(block)
      
      # This method will return the entire blockchain in formatted JSON
      def get_chain(self):
          return json.dumps([b.__dict__ for b in self.chain], indent=2)
  
output:     def __init__(self):
          self.chain = [self.create_genesis_block()]
      
      def create_genesis_block(self):
          return Block(0, "01/01/2023", "Genesis Block", "0")
      
      def is_chain_valid(self):
          for i in range(1, len(self.chain)):
              current_block = self.chain[i]
              previous_block = self.chain[i - 1]
              if current_block.hash != sha256(f'{current_block.index}{current_block.timestamp}{current_block.data}{current_block.previous_hash}'):
                  return False
              if current_block.previous_hash != previous_block.hash:
                  return False
          return True