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","."]
docstr: Return keys used for the internal dictionary.
docstr_tok: ["Return","keys","used","for","the","internal","dictionary","."]
code: def _get_internal_key(self, key):
      """Return keys used for the internal dictionary."""
      if is_train(key):
          return KerasModeKeys.TRAIN
      if is_eval(key):
          return KerasModeKeys.TEST
      if is_predict(key):
          return KerasModeKeys.PREDICT
      raise ValueError("Invalid mode key: {}.".format(key))
  
file_path: tensorflow-upstream/tensorflow/python/keras/saving/utils_v1/mode_keys.py
imports: import collections
label_desc: Use image node_id 2 for calling the ModeKeyMap obj's underlying member method code with example usage: obj._get_internal_key(key) and returns: KerasModeKeys, KerasModeKeys, KerasModeKeys