code: def _convert_to_torch_inputtype(
      inputs: List[TensorType],
  ) -> List[TensorType]:
      input_type = []
      for _input in inputs:
          if isinstance(_input, (list, tuple)):
              input_type.append(_convert_to_torch_inputtype(_input))
          elif isinstance(_input, InputType):
              if _input.shape is None:
                  raise ValueError(
                      "'shape' must be provided in the 'inputs' argument for pytorch conversion"
                  )
              input_type.append(_input)
          elif isinstance(_input, torch.Tensor):
              input_type.append(
                  TensorType(
                      shape=_input.shape,
                      dtype=torch_to_mil_types[_input.dtype],
                  )
              )
          else:
              raise ValueError(
                  "Unknown type {} for conversion to InputType.".format(
                      type(_input)
                  )
              )
      return input_type
  
imports: from collections import OrderedDict
  from typing import List, Optional, Union
  import numpy
  import torch
  from torch.jit._script import RecursiveScriptModule
  from coremltools import _logger
  from coremltools._deps import _HAS_TORCH_EXPORT_API
  from coremltools.converters.mil._deployment_compatibility import AvailableTarget
  from coremltools.converters.mil.input_types import ImageType, InputType, TensorType
  from coremltools.converters.mil.mil import Builder
  from coremltools.converters.mil.mil import Function, Placeholder, Program, types
  from coremltools.converters.mil.mil.types import is_float
  from coremltools.converters.mil.mil.var import Var
  from .._utils import get_output_names
  from .internal_graph import InternalTorchIRGraph, InternalTorchIRNode
  from .ops import TorchFrontend, convert_nodes
  from .quantization_ops import _dequantized_weight
  from .torch_op_registry import _TORCH_OPS_REGISTRY
  from .torchir_passes import flatten_graph_input_values, flatten_graph_output_values, generate_tensor_assignment_ops, remove_getattr_nodes, transform_inplace_ops
  from .torchscript_utils import torch_to_mil_types
label_desc: Use image node_id 1 for calling a global function with example usage: _convert_to_torch_inputtype(inputs) and returns: input_type