def METHOD_NAME(
    request, vcr, user_requested_network_access, vcr_state, monkeypatch
):
    def really_run_code_without_recording(func):
        if user_requested_network_access:
            # Run the setup code, but don't record it
            with monkeypatch.context() as m:
                m.setattr(vcr_state, "recording", RecordingMode.DISABLE)
                return func()
    return really_run_code_without_recording