          self._tensorboard.on_train_batch_end(self._model.iterations, logs=logs)
          if get_tf_version() == 2.8:
              # Bug in TF 2.8 where batch recording got deleted.
              # ref: https://github.com/keras-team/keras/issues/16173
              for name, value in logs.items():
                  tf.summary.scalar(
                      "batch_" + name,
                      value,
                      step=self._model._model._train_counter)  # pylint:disable=protected-access
  
      def _collate_and_store_loss(self, loss):
          """ Collate the loss into totals for each side.
  
          The losses are summed into a total for each side. Loss totals are added to
 
</s> remove         self._tensorboard.on_train_batch_end(self._model.iterations, logs=logs)
        if get_tf_version() == 2.8:
            # Bug in TF 2.8 where batch recording got deleted.
 </s> add         if get_tf_version() > 2.7:
            # Bug in TF 2.8/2.9 where batch recording got deleted. </s> remove             # following bug in TF 2.8 when writing records:
 </s> add             # following bug in TF 2.8/2.9 when writing records: </s> remove     def _test_for_gui(self):
 </s> add     def _test_for_gui(self) -> None: </s> remove     def append_softmax_activation(self, layer_index=-1):
 </s> add     def append_softmax_activation(self, layer_index: int = -1) -> None:
            with tf.summary.record_if(True), self._tensorboard._train_writer.as_default():  # noqa pylint:disable=protected-access,not-context-manager
                for name, value in logs.items():
                    tf.summary.scalar(
                        "batch_" + name,
                        value,
                        step=self._tensorboard._train_step)  # pylint:disable=protected-access
        else:
            self._tensorboard.on_train_batch_end(self._model.iterations, logs=logs)
          self._tensorboard.on_train_batch_end(self._model.iterations, logs=logs)
          if get_tf_version() == 2.8:
              # Bug in TF 2.8 where batch recording got deleted.
              # ref: https://github.com/keras-team/keras/issues/16173
            with tf.summary.record_if(True), self._tensorboard._train_writer.as_default():  # noqa pylint:disable=protected-access,not-context-manager
                for name, value in logs.items():
                    tf.summary.scalar(
                        "batch_" + name,
                        value,
                        step=self._tensorboard._train_step)  # pylint:disable=protected-access
        else:
            self._tensorboard.on_train_batch_end(self._model.iterations, logs=logs)
            with tf.summary.record_if(True), self._tensorboard._train_writer.as_default():  # noqa pylint:disable=protected-access,not-context-manager
                for name, value in logs.items():
                    tf.summary.scalar(
                        "batch_" + name,
                        value,
                        step=self._tensorboard._train_step)  # pylint:disable=protected-access
        else:
            self._tensorboard.on_train_batch_end(self._model.iterations, logs=logs)
            with tf.summary.record_if(True), self._tensorboard._train_writer.as_default():  # noqa pylint:disable=protected-access,not-context-manager
                for name, value in logs.items():
                    tf.summary.scalar(
                        "batch_" + name,
                        value,
                        step=self._tensorboard._train_step)  # pylint:disable=protected-access
        else:
            self._tensorboard.on_train_batch_end(self._model.iterations, logs=logs)
            with tf.summary.record_if(True), self._tensorboard._train_writer.as_default():  # noqa pylint:disable=protected-access,not-context-manager
                for name, value in logs.items():
                    tf.summary.scalar(
                        "batch_" + name,
                        value,
                        step=self._tensorboard._train_step)  # pylint:disable=protected-access
        else:
            self._tensorboard.on_train_batch_end(self._model.iterations, logs=logs)
            with tf.summary.record_if(True), self._tensorboard._train_writer.as_default():  # noqa pylint:disable=protected-access,not-context-manager
                for name, value in logs.items():
                    tf.summary.scalar(
                        "batch_" + name,
                        value,
                        step=self._tensorboard._train_step)  # pylint:disable=protected-access
        else:
            self._tensorboard.on_train_batch_end(self._model.iterations, logs=logs)
  
      def _collate_and_store_loss(self, loss):
          """ Collate the loss into totals for each side.
  
          The losses are summed into a total for each side. Loss totals are added to
keep keep keep keep replace replace replace replace replace keep keep keep keep keep
 Update TF to 2.9
    - Update TF to 2.7 to 2.9
    - Bump dependencies
    - Remove decode from pynvml calls
    - force keras predict functions to non-verbose
    - update tests
    - update Tensorboard logging
    - Update docs 
plugins/train/trainer/_base.py