code: def is_training_name(name):
      """
      **Guess** if this variable is only used in training.
      Only used internally to avoid too many logging. Do not use it.
      """
      # TODO: maybe simply check against TRAINABLE_VARIABLES and MODEL_VARIABLES?
      # TODO or use get_slot_names()
      name = get_op_tensor_name(name)[0]
      if name.endswith("/Adam") or name.endswith("/Adam_1"):
          return True
      if name.endswith("/Momentum"):
          return True
      if name.endswith("/Adadelta") or name.endswith("/Adadelta_1"):
          return True
      if name.endswith("/RMSProp") or name.endswith("/RMSProp_1"):
          return True
      if name.endswith("/Adagrad"):
          return True
      if (
          name.startswith("EMA/") or "/EMA/" in name
      ):  # all the moving average summaries
          return True
      if name.startswith("AccumGrad") or name.endswith("/AccumGrad"):
          return True
      if name.startswith("apply_gradients"):
          return True
      return False
  
imports: import glob
  import operator
  import numpy
  import os
  import pprint
  import six
  import tensorflow
  from ..compat import tfv1
  from ..utils import logger
  from .common import get_op_tensor_name
label_desc: Use image node_id 7 for calling a global function with example usage: is_training_name(name) and returns: False, True, True, True, True, True, True, True, True