code: def mode_to_str(mode):
      
      if mode == tf.estimator.ModeKeys.TRAIN:
          return "train"
      if mode == tf.estimator.ModeKeys.EVAL:
          return "eval"
      if mode == tf.estimator.ModeKeys.PREDICT:
          return "predict"
      return "unknown"
docs: Converts a tf.estimator.ModeKeys in a nice readable string.
      :param mode: The mdoe as a tf.estimator.ModeKeys
      :return: A human readable string representing the mode.