class_docstr: A context to maintain collection change in a tower.
class_docstr_tok: ["A","context","to","maintain","collection","change","in","a","tower","."]
code: def _default_diff_whitelist():
      ret = [
          tf.GraphKeys.TRAINABLE_VARIABLES,
          tf.GraphKeys.GLOBAL_VARIABLES,
          tf.GraphKeys.QUEUE_RUNNERS,
          tf.GraphKeys.LOCAL_VARIABLES,
      ]
      for newkey in ["COND_CONTEXT", "WHILE_CONTEXT", "LOSSES"]:
          if hasattr(tf.GraphKeys, newkey):
              ret.append(getattr(tf.GraphKeys, newkey))
      return ret
  
file_path: tensorpack/tensorpack/tfutils/collection.py
imports: from contextlib import contextmanager
  from copy import copy
  import six
  from ..compat import tfv1
  from ..utils import logger
  from ..utils.argtools import memoized
label_desc: Use image node_id 2 for calling the CollectionGuard obj's underlying member method code with example usage: obj._default_diff_whitelist() and returns: ret