class_docstr: Reads a composable pipeline's info from its proto representation.
class_docstr_tok: ["Reads","a","composable","pipeline","'s","info","from","its","proto","representation","."]
code: def __init__(self, pipeline: pipeline_pb2.Pipeline):
      self._pipeline = pipeline
      assert len(self._pipeline.nodes) >= 2, (
          "Got malformed composable pipeline proto. Expecting at least two nodes "
          "(PipelineBegin node and PipelineEnd node) in the composable pipeline."
      )
  
      self._begin_node = self._pipeline.nodes[0].pipeline_node
      assert self._begin_node.node_info.type.name.endswith(
          compiler_constants.PIPELINE_BEGIN_NODE_SUFFIX
      ), (
          "Got malformed composable pipeline proto. Expecting the first node in "
          "composable pipeline to be a PipelineBegin node."
      )
  
      self._end_node = self._pipeline.nodes[-1].pipeline_node
      assert self._end_node.node_info.type.name.endswith(
          compiler_constants.PIPELINE_END_NODE_SUFFIX
      ), (
          "Got malformed composable pipeline proto. Expecting the last node in "
          "composable pipeline to be a PipelineEnd node."
      )
  
      self._node_info = None
      self._contexts = None
  
imports: import abc
  from typing import Sequence, Union
  from tfx.dsl.compiler import constants
  from tfx.proto.orchestration import pipeline_pb2
  from google.protobuf import message
label_desc: Use image node_id 1 to create a new ComposablePipelineProtoView object from inherited base classes: NodeProtoView with example: obj = ComposablePipelineProtoView(pipeline)