docstr: Wraps the iterable with tqdm for global rank zero.
  
  Args:
      iterable: the iterable to wrap with tqdm
      total: the total length of the iterable, necessary in case the number of batches was limited.
docstr_tok: ["Wraps","the","iterable","with","tqdm","for","global","rank","zero",".","Args",":","iterable",":","the","iterable","to","wrap","with","tqdm","total",":","the","total","length","of","the","iterable",",","necessary","in","case","the","number","of","batches","was","limited","."]
code: def progbar_wrapper(
      self, iterable: Iterable, total: int, **kwargs: Any
  ):
      """Wraps the iterable with tqdm for global rank zero.
  
      Args:
          iterable: the iterable to wrap with tqdm
          total: the total length of the iterable, necessary in case the number of batches was limited.
  
      """
      if self.fabric.is_global_zero:
          return tqdm(iterable, total=total, **kwargs)
      return iterable
  
imports: import os
  from collections.abc import Mapping
  from functools import partial
  from typing import Any, Iterable, List, Literal, Optional, Tuple, Union, cast
  import lightning
  import torch
  from lightning.fabric.accelerators import Accelerator
  from lightning.fabric.loggers import Logger
  from lightning.fabric.strategies import Strategy
  from lightning.fabric.wrappers import _unwrap_objects
  from lightning.pytorch.utilities.model_helpers import is_overridden
  from lightning_utilities import apply_to_collection
  from tqdm import tqdm
label_desc: Use image node_id 8 for calling the MyCustomTrainer obj's underlying member method code with example usage: obj.progbar_wrapper(iterable, total) and returns: iterable, tqdm