class_docstr: A generic that takes a Type[tfx.types.Artifact] as its single argument.
code: def __init__(  # pylint: disable=invalid-name
      self,
      artifact_type: Union[
          Type[artifact.Artifact], Type[List[artifact.Artifact]]
      ],
      _init_via_getitem=False,
  ):
      if not _init_via_getitem:
          class_name = self.__class__.__name__
          raise ValueError(
              "%s should be instantiated via the syntax `%s[T]`, where T is a "
              "subclass of tfx.types.Artifact."
              % (class_name, class_name)
          )
      self.type = artifact_type
  
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 to create a new _ArtifactGeneric object  with example: obj = _ArtifactGeneric(artifact_type, _init_via_getitem)