class_docstr: A callback for progress bar visualization in training, evaluation, and prediction.
  It is initialized only on rank 0 in distributed environments.
  
  Args:
      refresh_rate: Determines at which rate (in number of steps) the progress bars get updated.
class_docstr_tok: ["A","callback","for","progress","bar","visualization","in","training",",","evaluation",",","and","prediction",".","It","is","initialized","only","on","rank","0","in","distributed","environments",".","Args",":","refresh_rate",":","Determines","at","which","rate","(","in","number","of","steps",")","the","progress","bars","get","updated","."]
code: def on_train_epoch_end(self, state: State, unit: TTrainUnit) -> None:
      pbar = self._train_progress_bar
      if pbar is not None:
          close_progress_bar(
              pbar,
              unit.train_progress.num_steps_completed_in_epoch,
              self._refresh_rate,
          )
  
imports: from typing import Optional
  from pyre_extensions import none_throws
  from torchtnt.framework.callback import Callback
  from torchtnt.framework.state import State
  from torchtnt.framework.unit import TEvalUnit, TPredictUnit, TTrainUnit
  from torchtnt.utils.distributed import get_global_rank
  from torchtnt.utils.tqdm import close_progress_bar, create_progress_bar, update_progress_bar
  from tqdm.auto import tqdm
label_desc: Use image node_id 4 for calling the TQDMProgressBar obj's underlying member method code with example usage: obj.on_train_epoch_end(state, unit) without return types