code: def backup_collection(keys=None):
      
      if keys is None:
          keys = tf.get_default_graph().get_all_collection_keys()
      ret = {}
      assert isinstance(keys, (list, tuple, set))
      for k in keys:
          ret[k] = copy(tf.get_collection(k))
      return ret
docs: Args:
          keys (list): list of collection keys to backup.
              Defaults to all keys in the graph.
  
      Returns:
          dict: the backup