class_docstr: A generic that takes a Type[tfx.types.Artifact] as its single argument.
docstr: Return the result of `_ArtifactGeneric[T]` for a given type T.
docstr_tok: ["Return","the","result","of","`","_ArtifactGeneric","[","T","]","`","for","a","given","type","T","."]
code: def _generic_getitem(cls, params):
      """Return the result of `_ArtifactGeneric[T]` for a given type T."""
      # Check that the given parameter is a concrete (i.e. non-abstract) subclass
      # of `tfx.types.Artifact`.
      if (
          inspect.isclass(params)
          and issubclass(params, artifact.Artifact)
          and params.TYPE_NAME
      ):
          return cls(params, _init_via_getitem=True)
      else:
          class_name = cls.__name__
          raise ValueError(
              (
                  "Generic type `%s[T]` expects the single parameter T to be a "
                  "concrete subclass of `tfx.types.Artifact` (got %r instead)."
              )
              % (class_name, params)
          )
  
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 2 for calling the _ArtifactGeneric obj's underlying member method code with example usage: obj._generic_getitem(cls, params) and returns: cls