code: def _check_valid_input_artifact_params(params):
      """Check if the annotation params is an Artifact or a List[Artifact]."""
      # If the typehint is List[Artifact], unwrap it.
      if params is list or get_origin(params) is list:
          generic_arg = get_args(params)
          if generic_arg is not None and len(generic_arg) == 1:
              params = generic_arg[0]
          else:
              return False
      if (
          inspect.isclass(params)
          and issubclass(params, artifact.Artifact)
          and hasattr(params, "TYPE_NAME")
      ):
          return True
      else:
          return False
  
imports: import inspect
  from typing import Any, Dict, Generic, List, Type, TypeVar, Union, get_args, get_origin
  from tfx.dsl.component.experimental import json_compat
  from tfx.types import artifact
  from tfx.utils import deprecation_utils
label_desc: Use image node_id 1 for calling a global function with example usage: _check_valid_input_artifact_params(params) and returns: True, False, False