code: def _progress_bar_constructor(
      influence_inst: "InfluenceFunctionBase",
      inputs_dataset: DataLoader,
      quantities_name: str,
      dataset_name: str = "inputs_dataset",
  ):
      # Try to determine length of progress bar if possible, with a default
      # of `None`.
      inputs_dataset_len = None
      try:
          inputs_dataset_len = len(inputs_dataset)
      except TypeError:
          warnings.warn(
              f"Unable to determine the number of batches in "
              f"`{dataset_name}`. Therefore, if showing the progress "
              f"of the computation of {quantities_name}, "
              "only the number of batches processed can be "
              "displayed, and not the percentage completion of the computation, "
              "nor any time estimates."
          )
  
      return progress(
          inputs_dataset,
          desc=(
              f"Using {influence_inst.get_name()} to compute {quantities_name}. "
              "Processing batch"
          ),
          total=inputs_dataset_len,
      )
  
imports: import warnings
  from functools import reduce
  from typing import Any, Callable, Iterable, List, NamedTuple, Optional, Tuple, TYPE_CHECKING, Union
  import torch
  import torch.nn
  from captum._utils.common import _get_module_from_name, _parse_version
  from captum._utils.gradient import _compute_jacobian_wrt_params, _compute_jacobian_wrt_params_with_sample_wise_trick
  from captum._utils.progress import progress
  from torch import Tensor
  from torch.nn import Module
  from torch.utils.data import DataLoader, Dataset
label_desc: Use image node_id 10 for calling a global function with example usage: _progress_bar_constructor(influence_inst, inputs_dataset, quantities_name, dataset_name) and returns: progress