code: def _create_progressbar_context(inst, X, message):
      """Create a progress bar taking into account ``inst.verbose``."""
      multiply = (
          len(inst.estimators_)
          if isinstance(inst, GeneralizingEstimator)
          else 1
      )
      n_steps = X.shape[-1] * max(1, multiply)
      mesg = f"{message} {inst.__class__.__name__}"
  
      which_tqdm = "off" if not _check_verbose(inst.verbose) else None
      context = ProgressBar(
          n_steps,
          mesg=mesg,
          position=inst.position,
          which_tqdm=which_tqdm,
      )
  
      return context
  
imports: import logging
  import numpy
  from ..fixes import _get_check_scoring
  from ..parallel import parallel_func
  from ..utils import ProgressBar, _parse_verbose, array_split_idx, fill_doc, verbose
  from .base import BaseEstimator, _check_estimator
  from .mixin import TransformerMixin
label_desc: Use image node_id 10 for calling a global function with example usage: _create_progressbar_context(inst, X, message) and returns: context