def get_remote_element(url, element_path=None):
    """
    :return: an element initialized with the content at the specified file or URL
    :see: get_element(parent_to_parse, element_path)
    """

    content = None

    if url is None:
        return content
    elif _FILE_LOCATION_REGEX.match(url):
        with open(url, 'rb') as xml:
            content = xml.read()
    else:
        try:
            urllib = getattr(six_moves, 'urllib')
            remote = urllib.request.urlopen(url)
            content = remote.read()
        finally:
            # For Python 2 compliance: fails in `with` block (no `__exit__`)
            remote.close()

    return get_element(strip_namespaces(content), element_path)
:return: an element initialized with the content at the specified file or URL
    :see: get_element(parent_to_parse, element_path)