code: def _tensorize_baseline(
      inputs: Tuple[Tensor, ...],
      baselines: Tuple[Union[int, float, Tensor], ...],
  ) -> Tuple[Tensor, ...]:
      def _tensorize_single_baseline(baseline, input):
          if isinstance(baseline, (int, float)):
              return torch.full_like(input, baseline)
          if (
              input.shape[0] > baseline.shape[0]
              and baseline.shape[0] == 1
          ):
              return torch.cat([baseline] * input.shape[0])
          return baseline
  
      assert isinstance(inputs, tuple) and isinstance(
          baselines, tuple
      ), (
          "inputs and baselines must"
          "have tuple type but found baselines: {} and inputs: {}".format(
              type(baselines), type(inputs)
          )
      )
      return tuple(
          _tensorize_single_baseline(baseline, input)
          for baseline, input in zip(baselines, 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 16 for calling a global function with example usage: _tensorize_baseline(inputs, baselines) and returns: tuple, baseline, torch, torch