class_docstr: Helper class to handle metadata I/O.
  
  Not thread-safe without external synchronisation.
docstr: Gets the context for the pipeline run.
  
  Args:
    pipeline_info: pipeline information for the current pipeline run.
  
  Returns:
    a matched context or None
docstr_tok: ["Gets","the","context","for","the","pipeline","run",".","Args",":","pipeline_info",":","pipeline","information","for","the","current","pipeline","run",".","Returns",":","a","matched","context","or","None"]
code: def get_pipeline_run_context(
      self, pipeline_info: data_types.PipelineInfo
  ) -> Optional[metadata_store_pb2.Context]:
      """Gets the context for the pipeline run.
  
      Args:
        pipeline_info: pipeline information for the current pipeline run.
  
      Returns:
        a matched context or None
      """
      if pipeline_info.run_id:
          return self.store.get_context_by_type_and_name(
              _CONTEXT_TYPE_PIPELINE_RUN,
              pipeline_info.pipeline_run_context_name,
          )
      else:
          return None
  
imports: import collections
  import copy
  import hashlib
  import itertools
  import os
  import random
  import time
  import types
  from typing import Any, Dict, List, Optional, Set, Tuple, Type, Union
  import absl
  from tfx.dsl.io import fileio
  from tfx.orchestration import data_types
  from tfx.orchestration.portable.mlmd import event_lib
  from tfx.types import artifact
  from tfx.types import artifact_utils
  import ml_metadata
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 32 for calling the Metadata obj's underlying member method code with example usage: obj.get_pipeline_run_context(pipeline_info) and returns: self, None