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 _restore_freeze(self, new):
      size_change = []
      for k, v in six.iteritems(self._freeze_backup):
          newv = new.get(k, [])
          if len(v) != len(newv):
              size_change.append((self._key_name(k), len(v), len(newv)))
      if size_change:
          logger.info(
              "These collections were modified but restored in {}: {}".format(
                  self._name,
                  ", ".join(
                      "({}: {}->{})".format(*t) for t in size_change
                  ),
              )
          )
      restore_collection(self._freeze_backup)
  
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 7 for calling the CollectionGuard obj's underlying member method code with example usage: obj._restore_freeze(new) without return types