<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def check_url(self, url, is_image_src=False):
 """ This method is used to check a URL. Returns :obj:`True` if the URL is "safe", :obj:`False` otherwise. The default implementation only allows HTTP and HTTPS links. That means no ``mailto:``, no ``xmpp:``, no ``ftp:``, etc. This method exists specifically to allow easy customization of link filtering through subclassing, so don't hesitate to write your own. If you're thinking of implementing a blacklist approach, see "`Which URL schemes are dangerous (XSS exploitable)? <http://security.stackexchange.com/q/148428/37409>`_". """

        return bool(self._allowed_url_re.match(url))