code: def create_progress_bar(
      name: str,
      unit: str,
      total: t.Optional[int] = None,
      iterable: t.Optional[t.Sequence[t.Any]] = None,
  ) -> t.Union[tqdm_notebook, HtmlProgressBar, tqdm.tqdm]:
      """Create a progress bar instance."""
      if iterable is not None:
          iterlen = len(iterable)
      elif total is not None:
          iterlen = total
      else:
          raise ValueError(
              "at least one of the parameters iterable | total must be not None"
          )
  
      is_disabled = get_verbosity() >= logging.WARNING
  
      if is_zmq_interactive_shell():
          return HtmlProgressBar(
              title=name,
              unit=unit,
              total=iterlen,
              iterable=iterable or range(iterlen),
              display_immediately=True,
              disable=is_disabled,
          )
      else:
          barlen = iterlen if iterlen > 5 else 5
          rbar = " {n_fmt}/{total_fmt} [Time: {elapsed}{postfix}]"
          bar_format = f"{{desc}}:\n|{{bar:{barlen}}}|{rbar}"
          return tqdm.tqdm(
              iterable=iterable,
              total=total,
              desc=name,
              unit=f" {unit}",
              leave=False,
              bar_format=bar_format,
              disable=is_disabled,
          )
  
imports: import logging
  import os
  import time
  import typing
  from functools import lru_cache
  import plotly.io
  import tqdm
  from ipykernel.zmqshell import ZMQInteractiveShell
  from IPython import get_ipython
  from IPython.display import display
  from IPython.terminal.interactiveshell import TerminalInteractiveShell
  from tqdm.notebook import tqdm
  from deepchecks.utils.logger import get_verbosity
label_desc: Use image node_id 10 for calling a global function with example usage: create_progress_bar(name, unit, total, iterable) and returns: HtmlProgressBar, tqdm