class_docstr: Uniquely identifies a pipeline among pipelines being actively orchestrated.
  
  Recommended to use `from_pipeline` or `from_pipeline_id_and_run_id` class
  methods to create `PipelineUid` objects as they correctly account for
  concurrent pipeline runs mode.
  
  Attributes:
    pipeline_id: Id of the pipeline containing the node. Corresponds to
      `Pipeline.pipeline_info.id` in the pipeline IR.
    pipeline_run_id: Run identifier for the pipeline if one is provided.
docstr: Creates a PipelineUid object given a pipeline IR.
docstr_tok: ["Creates","a","PipelineUid","object","given","a","pipeline","IR","."]
code: def from_pipeline(
      cls: Type["PipelineUid"], pipeline: pipeline_pb2.Pipeline
  ) -> "PipelineUid":
      """Creates a PipelineUid object given a pipeline IR."""
      if (
          env.get_env().concurrent_pipeline_runs_enabled()
          and pipeline.execution_mode == pipeline_pb2.Pipeline.SYNC
      ):
          pipeline_run_id = (
              pipeline.runtime_spec.pipeline_run_id.field_value.string_value
          )
          if not pipeline_run_id:
              raise ValueError(
                  "pipeline_run_id unexpectedly missing for a sync pipeline."
              )
      else:
          pipeline_run_id = None
  
      return cls(
          pipeline_id=pipeline.pipeline_info.id,
          pipeline_run_id=pipeline_run_id,
      )
  
imports: import abc
  import enum
  from typing import Dict, Hashable, List, Optional, Sequence, Type, TypeVar
  import attr
  from tfx import types
  from tfx.orchestration import node_proto_view
  from tfx.orchestration.experimental.core import env
  from tfx.proto.orchestration import pipeline_pb2
  from tfx.utils import status
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 1 for calling the PipelineUid obj's underlying member method code with example usage: obj.from_pipeline(cls, pipeline) and returns: cls