def _reload_docs(
        cls, collection_name, sample_ids=None, frame_ids=None, hard=False
    ):
        """Reloads the backing documents for in-memory frames in the
        collection.

        If ``sample_ids`` are provided, only frames attached to samples with
        these IDs are reloaded.
        """
        if collection_name not in cls._instances:
            return

        samples = cls._instances[collection_name]

        if sample_ids is not None:
            sample_ids = set(str(_id) for _id in sample_ids)
            for sample_id in sample_ids:
                frames = samples.get(sample_id, {})
                for frame in frames.values():
                    frame.reload(hard=hard)
        elif frame_ids is not None:
            frame_ids = set(str(_id) for _id in frame_ids)
            for frames in samples.values():
                for frame in frames.values():
                    if frame.id in frame_ids:
                        frame.reload(hard=hard)
        else:
            for frames in samples.values():
                for frame in frames.values():
                    frame.reload(hard=hard)
Reloads the backing documents for in-memory frames in the
        collection.

        If ``sample_ids`` are provided, only frames attached to samples with
        these IDs are reloaded.
        
fiftyone/core/singletons.py