code: def get_slices_for_features_dicts(
      features_dicts: Iterable[
          Union[
              types.DictOfTensorValue, types.DictOfFetchedTensorValues
          ]
      ],
      default_features_dict: Union[
          types.DictOfTensorValue, types.DictOfFetchedTensorValues
      ],
      slice_spec: List[SingleSliceSpec],
  ) -> Iterable[SliceKeyType]:
      """Generates the slice keys appropriate for the given features dictionaries.
  
      Args:
        features_dicts: Features dictionaries. For example a list of transformed
          features dictionaries.
        default_features_dict: Additional dict to search if a match is not found in
          features dictionaries. For example the raw features.
        slice_spec: slice specification.
  
      Yields:
        Slice keys appropriate for the given features dictionaries.
      """
      accessor = slice_accessor.SliceAccessor(
          features_dicts, default_features_dict
      )
      for single_slice_spec in slice_spec:
          for slice_key in single_slice_spec.generate_slices(accessor):
              yield slice_key
  
imports: import itertools
  from typing import Any, Callable, Dict, Generator, Iterable, List, NamedTuple, Optional, Tuple, Union
  import apache_beam
  import numpy
  import tensorflow
  from tensorflow_model_analysis import constants
  from tensorflow_model_analysis.api import types
  from tensorflow_model_analysis.proto import config_pb2
  from tensorflow_model_analysis.proto import metrics_for_slice_pb2
  from tensorflow_model_analysis.slicer import slice_accessor
label_desc: Use image node_id 7 for calling a global function with example usage: get_slices_for_features_dicts(features_dicts, default_features_dict, slice_spec) without return types