code: def _validate_input(
      inputs: Tuple[Tensor, ...],
      baselines: Tuple[Union[Tensor, int, float], ...],
      draw_baseline_from_distrib: bool = False,
  ) -> None:
      assert len(inputs) == len(baselines), (
          "Input and baseline must have the same "
          "dimensions, baseline has {} features whereas input has {}.".format(
              len(baselines), len(inputs)
          )
      )
  
      for input, baseline in zip(inputs, baselines):
          if draw_baseline_from_distrib:
              assert (
                  isinstance(baseline, (int, float))
                  or input.shape[1:] == baseline.shape[1:]
              ), (
                  "The samples in input and baseline batches must have"
                  " the same shape or the baseline corresponding to the"
                  " input tensor must be a scalar."
                  " Found baseline: {} and input: {} ".format(
                      baseline, input
                  )
              )
          else:
              assert (
                  isinstance(baseline, (int, float))
                  or input.shape == baseline.shape
                  or baseline.shape[0] == 1
              ), (
                  "Baseline can be provided as a tensor for just one input and"
                  " broadcasted to the batch or input and baseline must have the"
                  " same shape or the baseline corresponding to each input tensor"
                  " must be a scalar. Found baseline: {} and input: {}".format(
                      baseline, input
                  )
              )
  
imports: import typing
  from enum import Enum
  from functools import reduce
  from inspect import signature
  from typing import Any, Callable, cast, Dict, List, overload, Tuple, Union
  import numpy
  import torch
  from captum._utils.typing import BaselineType, Literal, TargetType, TensorOrTupleOfTensorsGeneric, TupleOrTensorOrBoolGeneric
  from torch import device, Tensor
  from torch.nn import Module
label_desc: Use image node_id 7 for calling a global function with example usage: _validate_input(inputs, baselines, draw_baseline_from_distrib) without return types