class_docstr: Artifact Placeholder represents an input or an output artifact.
  
  Prefer to use ph.input(...) or ph.output(...) to create instances.
class_docstr_tok: ["Artifact","Placeholder","represents","an","input","or","an","output","artifact",".","Prefer","to","use","ph.input","(","...",")","or","ph.output","(","...",")","to","create","instances","."]
docstr: Initializes the class. Consider this private.
docstr_tok: ["Initializes","the","class",".","Consider","this","private","."]
code: def __init__(
      self,
      key: str,
      is_input: bool,
      index: Optional[int] = None,
  ):
      """Initializes the class. Consider this private."""
      # This should be tfx.types.Artifact, but it can't be due to a circular
      # dependency. See placeholder_base.py for details. TODO(b/191610358).
      super().__init__(expected_type=None)
      assert index is None or isinstance(index, int)
      self._key = key
      self._is_input = is_input
      self._index = index
  
imports: from __future__ import annotations
  from typing import Any, Optional, Type
  from tfx.dsl.placeholder import placeholder_base
  from tfx.proto.orchestration import placeholder_pb2
label_desc: Use image node_id 1 to create a new ArtifactPlaceholder object from inherited base classes: placeholder_base with example: obj = ArtifactPlaceholder(key, is_input, index)