code: def create_progress_bar(
      dataloader: Iterable[object],
      *,
      desc: str,
      num_epochs_completed: int,
      num_steps_completed: int,
      max_steps: Optional[int],
      max_steps_per_epoch: Optional[int],
  ) -> tqdm:
      """Constructs a :func:`tqdm` progress bar. The number of steps in an epoch is inferred from the dataloader, num_steps_completed, max_steps and max_steps_per_epoch.
  
      Args:
          dataloader: an iterable of data, used to infer number of steps in an epoch.
          desc: a description for the progress bar.
          num_epochs_completed: an integer for the number of epochs completed so far int he loop.
          num_steps_completed: an integer for the number of steps completed so far in the loop.
          max_steps: an optional integer for the number of max steps in the loop.
          max_steps_per_epoch: an optional integer for the number of max steps per epoch.
      """
      current_epoch = num_epochs_completed
      total = estimated_steps_in_epoch(
          dataloader,
          num_steps_completed=num_steps_completed,
          max_steps=max_steps,
          max_steps_per_epoch=max_steps_per_epoch,
      )
      return tqdm(
          desc=f"{desc} {current_epoch}",
          total=total,
          initial=num_steps_completed,
          bar_format="{l_bar}{bar}{r_bar}\n",
      )
  
imports: import logging
  from typing import Iterable, Optional
  from torchtnt.utils.progress import estimated_steps_in_epoch
  from tqdm.auto import tqdm
label_desc: Use image node_id 1 for calling a global function with example usage: create_progress_bar(dataloader) and returns: tqdm