def resolve_remote(self, uri):
try:<EOL><INDENT>import requests<EOL><DEDENT>except ImportError:<EOL><INDENT>requests = None<EOL><DEDENT>scheme = urlsplit(uri).scheme<EOL>if scheme in self.handlers:<EOL><INDENT>result = self.handlers[scheme](uri)<EOL><DEDENT>elif scheme in [u"<STR_LIT:http>", u"<STR_LIT>"] and requests:<EOL><INDENT>result = requests.get(uri).json()<EOL><DEDENT>else:<EOL><INDENT>with urlopen(uri) as url:<EOL><INDENT>result = json.loads(url.read().decode("<STR_LIT:utf-8>"))<EOL><DEDENT><DEDENT>if self.cache_remote:<EOL><INDENT>self.store[uri] = result<EOL><DEDENT>return result<EOL>
Resolve a remote ``uri``.

If called directly, does not check the store first, but after
retrieving the document at the specified URI it will be saved in
the store if :attr:`cache_remote` is True.

.. note::

    If the requests_ library is present, ``jsonschema`` will use it to
    request the remote ``uri``, so that the correct encoding is
    detected and used.

    If it isn't, or if the scheme of the ``uri`` is not ``http`` or
    ``https``, UTF-8 is assumed.

Arguments:

    uri (str):

        The URI to resolve

Returns:

    The retrieved document

.. _requests: https://pypi.org/project/requests/