code: def _get_subclasses(cls: Type[Artifact]) -> List[Type[Artifact]]:
      """Internal method. Get transitive subclasses of an Artifact subclass."""
      all_subclasses = []
      for subclass in cls.__subclasses__():
          all_subclasses.append(subclass)
          all_subclasses.extend(_get_subclasses(subclass))
      return all_subclasses
  
file_path: tfx/tfx/types/artifact_utils.py
imports: import itertools
  import json
  import os
  from typing import Dict, List, Optional, Type, Union
  from absl import logging
  from tfx.dsl.io import fileio
  from tfx.types import artifact
  from tfx.types import standard_artifact_utils
  from tfx.types import value_artifact
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 6 for calling a global function with example usage: _get_subclasses(cls) and returns: all_subclasses