code: def progress(
      iterable: Iterable = None,
      desc: str = None,
      total: int = None,
      use_tqdm=True,
      file: TextIO = None,
      mininterval: float = 0.5,
      **kwargs,
  ):
      # Try to use tqdm is possible. Fall back to simple progress print
      if tqdm and use_tqdm:
          return tqdm(
              iterable,
              desc=desc,
              total=total,
              file=file,
              mininterval=mininterval,
              **kwargs,
          )
      else:
          if not tqdm and use_tqdm:
              warnings.warn(
                  "Tried to show progress with tqdm "
                  "but tqdm is not installed. "
                  "Fall back to simply print out the progress."
              )
          return SimpleProgress(
              iterable,
              desc=desc,
              total=total,
              file=file,
              mininterval=mininterval,
          )
  
imports: import sys
  import warnings
  from time import time
  from typing import cast, Iterable, Sized, TextIO
  from captum._utils.typing import Literal
label_desc: Use image node_id 1 for calling a global function with example usage: progress(iterable, desc, total, use_tqdm, file, mininterval) and returns: tqdm, SimpleProgress