class_docstr: Singleton metaclass for :class:`fiftyone.core.sample.Sample`.
  
  This metaclass maintains a weakref dictionary of all in-memory
  :class:`fiftyone.core.sample.Sample` instances keyed by
  ``[collection name][sample ID]``.
docstr: Syncs the backing documents for all in-memory samples in the
  collection according to the following rules:
  
  -   Documents whose IDs are in ``sample_ids`` are reloaded
  -   Documents whose IDs are not in ``sample_ids`` are reset
docstr_tok: ["Syncs","the","backing","documents","for","all","in-memory","samples","in","the","collection","according","to","the","following","rules",":","-","Documents","whose","IDs","are","in","``","sample_ids","``","are","reloaded","-","Documents","whose","IDs","are","not","in","``","sample_ids","``","are","reset"]
code: def _sync_docs(cls, collection_name, sample_ids, hard=False):
      """Syncs the backing documents for all in-memory samples in the
      collection according to the following rules:
  
      -   Documents whose IDs are in ``sample_ids`` are reloaded
      -   Documents whose IDs are not in ``sample_ids`` are reset
      """
      if collection_name not in cls._instances:
          return
  
      samples = cls._instances[collection_name]
  
      sample_ids = set(str(_id) for _id in sample_ids)
      reset_ids = set()
      for sample in samples.values():
          if sample.id in sample_ids:
              sample.reload(hard=hard)
          else:
              reset_ids.add(sample.id)
              sample._reset_backing_doc()
  
      for sample_id in reset_ids:
          samples.pop(sample_id, None)
  
imports: from collections import defaultdict
  import weakref
label_desc: Use image node_id 10 for calling the SampleSingleton obj's underlying member method code with example usage: obj._sync_docs(cls, collection_name, sample_ids, hard) without return types