code: def yield_value(modality, iterable):
      """Yield elements of `iterable` in a deterministic order.
  
      Args:
        modality: enum value of supported modality [Modality.CORE or Modality.DATA]
        iterable: an iterable.
  
      Yields:
        The iterable elements in a deterministic order.
      """
      if modality == Modality.CORE:
          yield from _tf_core_yield_value(iterable)
      elif modality == Modality.DATA:
          yield from _tf_data_yield_value(iterable)
      else:
          raise ValueError(
              "Unknown modality used {} for nested structure".format(
                  modality
              )
          )
  
imports: import collections
  import enum
  import wrapt
  from tensorflow.python import pywrap_tensorflow
  from tensorflow.python.platform import tf_logging
  from tensorflow.python.util import _pywrap_utils
  from tensorflow.python.util.compat import collections_abc
  from tensorflow.python.util.custom_nest_protocol import CustomNestProtocol
label_desc: Use image node_id 7 for calling a global function with example usage: yield_value(modality, iterable) without return types