code: def _get_resolver_event_type(
      event: metadata_store_pb2.Event,
  ) -> EventType:
      """Gets an indicator of whether `event` is an input / output event.
  
      Args:
        event: an event object, with an event type associated.
  
      Returns:
        An `EventType` enum indicating whether `event` is an input / output
        event.
      """
  
      if event.type in INPUT_EVENT_TYPES:
          return EventType.INPUT
      elif event.type in OUTPUT_EVENT_TYPES:
          return EventType.OUTPUT
      else:
          raise ValueError("Event without type.")
  
file_path: ml-metadata/ml_metadata/tools/mlmd_resolver/metadata_resolver_utils.py
imports: import collections
  import enum
  from typing import Callable, Dict, List, Optional, Set
  import attr
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 2 for calling a global function with example usage: _get_resolver_event_type(event) and returns: EventType, EventType