def METHOD_NAME(self, batch: int, logs: Optional[Dict[str, Any]] = None) -> None:
    self.global_step += 1
    """An alias for `on_train_batch_end` for backwards compatibility."""
    if self.logging_batch_wise and batch % self.log_freq == 0:
        logs = {f"batch/{k}": v for k, v in logs.items()} if logs else {}
        logs["batch/batch_step"] = self.global_batch
        lr = self._get_lr()
        if lr is not None:
            logs["batch/learning_rate"] = lr
        wandb.log(logs)
        self.global_batch += self.log_freq