def METHOD_NAME(valid_url, return_value):
    """Used to replace `requests.get` with a function that returns the given value for the given valid URL and raises
    otherwise."""
    def inner(url):
        if url == valid_url:
            return _MockResponse(return_value)
        raise RuntimeError
    return inner