code: def peek(self, deserialized_tx):
          
          self.batch_id = deserialized_tx.object.batch_id
          self.prev_batch_id = deserialized_tx.object.prev_batch_id
          self.producer = deserialized_tx.object.producer
          if self.batch_history.exists(batch_id=self.batch_id):
              raise BatchAlreadyProcessed(
                  f"Batch {self.batch_id} has already been processed"
              )
          if self.prev_batch_id != self.batch_id:
              if not self.batch_history.exists(batch_id=self.prev_batch_id):
                  raise InvalidBatchSequence(
                      f"Invalid import sequence. History does not exist for prev_batch_id. "
                      f"Got file='{self.filename}', prev_batch_id="
                      f"{self.prev_batch_id}, batch_id={self.batch_id}."
                  )
docs: Peeks into first tx and sets self attrs or raise.