def url(regex, view, kwargs=None, name=None, prefix=''):
    """
    sets up a regexp pattern for url processing
    """
    if isinstance(view, (list, tuple)):
        # For include(...) processing.
        urlconf_module, app_name, namespace = view
        return urlresolvers.RegexURLResolver(regex, urlconf_module, kwargs,
            app_name=app_name, namespace=namespace
            )
    else:
        if isinstance(view, str):
            if not view:
                raise ImproperlyConfigured('Empty URL pattern view name not '
                    'permitted (for pattern %r)' % regex
                    )
            if prefix:
                view = '%s.%s' % (prefix, view)
            if name is None:
                name = uncamel(view.split('.')[-1])
        return RegexURLPattern(regex, view, kwargs, name)
dataset/ETHPy150Open aino/aino-utkik/utkik/dispatch.py/url/original