human
Solve the following python programming problem given the following code:
@core_helper
def url_for_static_or_external(*args, **kw):
assistant
#Here is the Python code you requested.

    """Returns the URL for static content that doesn\t get translated (eg CSS),
    or external URLs
    This is a wrapper for :py:func:`routes.url_for`
    """
    def fix_arg(arg):
        url = urlparse.urlparse(str(arg))
        url_is_relative = ((url.scheme == '') and (url.netloc == '') and (not url.path.startswith('/')))
        if url_is_relative:
            return ('/' + url.geturl())
        return url.geturl()
    if args:
        args = ((fix_arg(args[0]),) + args[1:])
    if kw.get('qualified', False):
        (kw['protocol'], kw['host']) = get_site_protocol_and_host()
    my_url = _routes_default_url_for(*args, **kw)
    return _local_url(my_url, locale='default', **kw)