class_docstr: Singleton metaclass for :class:`fiftyone.core.frame.Frame`.
  
  This metaclass maintains a weakref dictionary of all in-memory
  :class:`fiftyone.core.frame.Frame` instances keyed by
  ``[collection name][sample ID][frame number]``.
docstr: Resets the backing documents for all in-memory frames with the given
  frame IDs.
  
  When ``keep=True``, all frames whose IDs are **not** in ``frame_ids``
  are reset instead.
docstr_tok: ["Resets","the","backing","documents","for","all","in-memory","frames","with","the","given","frame","IDs",".","When","``","keep=True","``",",","all","frames","whose","IDs","are","*","*","not","*","*","in","``","frame_ids","``","are","reset","instead","."]
code: def _reset_docs_by_frame_id(
      cls, collection_name, frame_ids, keep=False
  ):
      """Resets the backing documents for all in-memory frames with the given
      frame IDs.
  
      When ``keep=True``, all frames whose IDs are **not** in ``frame_ids``
      are reset instead.
      """
      if collection_name not in cls._instances:
          return
  
      samples = cls._instances[collection_name]
  
      frame_ids = set(str(_id) for _id in frame_ids)
      reset = []
  
      if keep:
          for sample_id, frames in samples.items():
              for fn, frame in frames.items():
                  if frame.id not in frame_ids:
                      frame._reset_backing_doc()
                      reset.append((sample_id, fn))
      else:
          for sample_id, frames in samples.items():
              for fn, frame in frames.items():
                  if frame.id in frame_ids:
                      frame._reset_backing_doc()
                      reset.append((sample_id, fn))
  
      for sample_id, fn in reset:
          samples[sample_id].pop(fn)
  
imports: from collections import defaultdict
  import weakref
label_desc: Use image node_id 15 for calling the FrameSingleton obj's underlying member method code with example usage: obj._reset_docs_by_frame_id(cls, collection_name, frame_ids, keep) without return types