code: def _format_outputs(
      is_multiple_inputs: bool, outputs: List[Tuple[Tensor, ...]]
  ) -> Union[
      Tensor,
      Tuple[Tensor, ...],
      List[Union[Tensor, Tuple[Tensor, ...]]],
  ]:
      assert isinstance(outputs, list), "Outputs must be a list"
      assert is_multiple_inputs or len(outputs) == 1, (
          "outputs should contain multiple inputs or have a single output"
          f"however the number of outputs is: {len(outputs)}"
      )
  
      return (
          [
              _format_output(len(output) > 1, output)
              for output in outputs
          ]
          if is_multiple_inputs
          else _format_output(len(outputs[0]) > 1, outputs[0])
      )
  
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 35 for calling a global function with example usage: _format_outputs(is_multiple_inputs, outputs) and returns: unknown