code: def _validate_input_list(
      input_list: Sequence[types.Artifact],
  ) -> types.Artifact:
      """Checks that input_list contains only a single Model, and returns it."""
      if (
          len(input_list) > 1
          or input_list[0].TYPE_NAME != ops_utils.MODEL_TYPE_NAME
      ):
          raise exceptions.InvalidArgument(
              "The input_list for TrainingRange expects only a single Model artifact."
          )
  
      return input_list[0]
  
file_path: tfx/tfx/dsl/input_resolution/ops/training_range_op.py
imports: from typing import Any, List, Sequence
  from tfx import types
  from tfx.dsl.input_resolution import resolver_op
  from tfx.dsl.input_resolution.ops import ops_utils
  from tfx.orchestration.portable.input_resolution import exceptions
  from tfx.orchestration.portable.mlmd import event_lib
  from tfx.types import artifact_utils
  from ml_metadata.proto import metadata_store_pb2
  from ml_metadata.tools.mlmd_resolver import metadata_resolver
label_desc: Use image node_id 1 for calling a global function with example usage: _validate_input_list(input_list) and returns: input_list