def patch_grype_wrapper_singleton(monkeypatch, test_grype_wrapper_singleton):
    """
    This fixture returns a parameterized callback that patches the calls to get a new grype wrapper singleton
    at that path to instead return the clean, populated instance created by test_grype_wrapper_singleton.
    """

    def _test_grype_wrapper_singleton(patch_paths: list):
        for patch_path in patch_paths:
            monkeypatch.setattr(
                patch_path,
                lambda: test_grype_wrapper_singleton,
            )

    return _test_grype_wrapper_singleton