code: def _format_callable_baseline(
      baselines: Union[
          None,
          Callable[..., Union[Tensor, Tuple[Tensor, ...]]],
          Tensor,
          int,
          float,
          Tuple[Union[Tensor, int, float], ...],
      ],
      inputs: Union[Tensor, Tuple[Tensor, ...]],
  ) -> Tuple[Union[Tensor, int, float], ...]:
      if callable(baselines):
          # Note: this assumes that if baselines is a function and if it takes
          # arguments, then the first argument is the `inputs`.
          # This can be expanded in the future with better type checks
          baseline_parameters = signature(baselines).parameters
          if len(baseline_parameters) == 0:
              baselines = baselines()
          else:
              baselines = baselines(inputs)
      return _format_baseline(
          baselines, _format_tensor_into_tuples(inputs)
      )
  
imports: import typing
  from inspect import signature
  from typing import Any, Callable, List, Tuple, TYPE_CHECKING, Union
  import torch
  from captum._utils.common import _format_baseline, _format_output, _format_tensor_into_tuples, _validate_input
  from captum._utils.typing import BaselineType, Literal, TargetType, TensorOrTupleOfTensorsGeneric
  from captum.attr._utils.approximation_methods import SUPPORTED_METHODS
  from torch import Tensor
label_desc: Use image node_id 10 for calling a global function with example usage: _format_callable_baseline(baselines, inputs) and returns: _format_baseline