code: def add_event_path(
      event: metadata_store_pb2.Event, key: str, index: int
  ) -> None:
      """Adds event path to a given MLMD event."""
      # The order matters, we always use the first step to store key and the second
      # step to store index.
      event.path.steps.add().key = key
      event.path.steps.add().index = index
  
file_path: tfx/tfx/orchestration/portable/mlmd/event_lib.py
imports: import collections
  import contextlib
  from typing import Dict, List, Optional, Sequence, Tuple, TypeVar
  from tfx import types
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 9 for calling a global function with example usage: add_event_path(event, key, index) without return types