class_docstr: Special callback used by the learning rate finder. This callback logs the learning rate before each batch and
  logs the corresponding loss after each batch.
  
  Args:
      num_training: number of iterations done by the learning rate finder
      early_stop_threshold: threshold for stopping the search. If the
          loss at any point is larger than ``early_stop_threshold*best_loss``
          then the search is stopped. To disable, set to ``None``.
      progress_bar_refresh_rate: rate to refresh the progress bar for
          the learning rate finder
      beta: smoothing value, the loss being logged is a running average of
          loss values logged until now. ``beta`` controls the forget rate i.e.
          if ``beta=0`` all past information is ignored.
docstr: Called before each training batch, logs the lr that will be used.
docstr_tok: ["Called","before","each","training","batch",",","logs","the","lr","that","will","be","used","."]
code: def on_train_batch_start(
      self,
      trainer: "pl.Trainer",
      pl_module: "pl.LightningModule",
      batch: Any,
      batch_idx: int,
  ) -> None:
      """Called before each training batch, logs the lr that will be used."""
      if (
          trainer.fit_loop.batch_idx + 1
      ) % trainer.accumulate_grad_batches != 0:
          return
  
      if self.progress_bar_refresh_rate and self.progress_bar is None:
          self.progress_bar = tqdm(
              desc="Finding best initial lr", total=self.num_training
          )
  
      self.lrs.append(trainer.lr_scheduler_configs[0].scheduler.lr[0])
  
imports: import importlib
  import logging
  import os
  import uuid
  from copy import deepcopy
  from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union, cast
  import torch
  from lightning_utilities.core.imports import RequirementCache
  from typing_extensions import override
  import lightning.pytorch
  from lightning.fabric.utilities.types import _TORCH_LRSCHEDULER
  from lightning.pytorch.callbacks import Callback
  from lightning.pytorch.utilities.exceptions import MisconfigurationException
  from lightning.pytorch.utilities.parsing import lightning_hasattr, lightning_setattr
  from lightning.pytorch.utilities.rank_zero import rank_zero_warn
  from lightning.pytorch.utilities.types import STEP_OUTPUT, LRScheduler, LRSchedulerConfig
label_desc: Use image node_id 2 for calling the _LRCallback obj's underlying member method code with example usage: obj.on_train_batch_start(trainer, pl_module, batch, batch_idx) without return types