code: def make_tqdm_progress_bar_fn(description="", leave=True):
      """Make a `progress_bar_fn` that uses `tqdm`.
  
      Args:
        description: `str` to display next to the progress bar, default is "".
        leave: Boolean whether to leave the progress bar up after finished.
  
      Returns:
        tqdm_progress_bar_fn: A function that takes an integer `num_steps` and
          returns a `tqdm` progress bar iterator.
      """
  
      def tqdm_progress_bar_fn(num_steps):
          try:
              import tqdm  # pylint: disable=g-import-not-at-top
          except ImportError:
              raise ImportError(
                  "Please install tqdm via pip install tqdm"
              )
          return iter(
              tqdm.tqdm(range(num_steps), desc=description, leave=leave)
          )
  
      return tqdm_progress_bar_fn
  
file_path: probability/tensorflow_probability/python/experimental/mcmc/progress_bar_reducer.py
imports: import tensorflow.compat.v2
  from tensorflow_probability.python.experimental.mcmc import reducer
label_desc: Use image node_id 1 for calling a global function with example usage: make_tqdm_progress_bar_fn(description, leave) and returns: tqdm_progress_bar_fn, iter