def METHOD_NAME(self, url, future):
    # Utility method for validating and setting the URL with a future.
    if (url is not None) and not (
        url.startswith("https://") or url.startswith("http://")
    ):
        raise ValueError("WebView can only display http:// and https:// URLs")
    self._impl.set_url(url, future=future)