code: def _get_typed_dict_required_keys(tp: TypedDict) -> Iterable[str]:
      if hasattr(tp, "__required_keys__"):
          return tp.__required_keys__
      if tp.__total__:
          return _get_annotations(tp).keys()
      else:
          return []
  
file_path: tfx/tfx/utils/pure_typing_utils.py
imports: import collections.abc
  import inspect
  import sys
  import types
  import typing
  from typing import Any, Iterable, Literal, Mapping, Type, TypeVar, TypedDict
  from typing_extensions import Annotated, NotRequired, Required, TypeGuard
  from google.protobuf.internal import enum_type_wrapper
label_desc: Use image node_id 2 for calling a global function with example usage: _get_typed_dict_required_keys(tp) and returns: tp, _get_annotations, list