def _reset_docs(cls, collection_name, sample_ids=None):
        """Resets the backing documents for in-memory samples in the
        collection.

        Reset samples will no longer belong to their parent dataset.

        If ``sample_ids`` are provided, only those samples are reset.
        """
        if collection_name not in cls._instances:
            return

        if sample_ids is not None:
            samples = cls._instances[collection_name]
            for sample_id in sample_ids:
                sample = samples.pop(str(sample_id), None)
                if sample is not None:
                    sample._reset_backing_doc()
        else:
            samples = cls._instances.pop(collection_name)
            for sample in samples.values():
                sample._reset_backing_doc()
Resets the backing documents for in-memory samples in the
        collection.

        Reset samples will no longer belong to their parent dataset.

        If ``sample_ids`` are provided, only those samples are reset.
        
fiftyone/core/singletons.py