class_docstr: Map using ModeKeys as keys.
  
  This class creates an immutable mapping from modes to values. For example,
  SavedModel export of Keras and Estimator models use this to map modes to their
  corresponding MetaGraph tags/SignatureDef keys.
  
  Since this class uses modes, rather than strings, as keys, both "predict"
  (Keras's PREDICT ModeKey) and "infer" (Estimator's PREDICT ModeKey) map to the
  same value.
class_docstr_tok: ["Map","using","ModeKeys","as","keys",".","This","class","creates","an","immutable","mapping","from","modes","to","values",".","For","example",",","SavedModel","export","of","Keras","and","Estimator","models","use","this","to","map","modes","to","their","corresponding","MetaGraph","tags\/SignatureDef","keys",".","Since","this","class","uses","modes",",","rather","than","strings",",","as","keys",",","both","``","predict","''","(","Keras","'s","PREDICT","ModeKey",")","and","``","infer","''","(","Estimator","'s","PREDICT","ModeKey",")","map","to","the","same","value","."]
code: def __init__(self, **kwargs):
      self._internal_dict = {}
      self._keys = []
      for key in kwargs:
          self._keys.append(key)
          dict_key = self._get_internal_key(key)
          if dict_key in self._internal_dict:
              raise ValueError(
                  "Error creating ModeKeyMap. Multiple keys/values found for {} mode.".format(
                      dict_key
                  )
              )
          self._internal_dict[dict_key] = kwargs[key]
  
file_path: tensorflow-upstream/tensorflow/python/keras/saving/utils_v1/mode_keys.py
imports: import collections
label_desc: Use image node_id 1 to create a new ModeKeyMap object from inherited base classes: collections.abc with example: obj = ModeKeyMap()