def _sync_docs(cls, collection_name, sample_ids, hard=False):
        """Syncs the backing documents for all in-memory frames according to
        the following rules:

        -   Frames attached to samples whose IDs are in ``sample_ids`` are
            reloaded
        -   Frames attached to samples 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_id, frames in samples.items():
            if sample_id in sample_ids:
                for frame in frames.values():
                    frame.reload(hard=hard)
            else:
                reset_ids.add(sample_id)
                for frame in frames.values():
                    frame._reset_backing_doc()

        for sample_id in reset_ids:
            frames = samples.pop(sample_id)
Syncs the backing documents for all in-memory frames according to
        the following rules:

        -   Frames attached to samples whose IDs are in ``sample_ids`` are
            reloaded
        -   Frames attached to samples whose IDs are not in ``sample_ids`` are
            reset
        
fiftyone/core/singletons.py