def splittype(url):
    global _typeprog
    if _typeprog is None:
        import re
        _typeprog = re.compile('^([^/:]+):')

    match = _typeprog.match(url)
    if match:
        scheme = match.group(1)
        return scheme.lower(), url[len(scheme) + 1:]
    return None, url
@method_decorator can be used to decorate a class and its methods.
dataset/ETHPy150Open kleientertainment/ds_mod_tools/pkg/win32/Python27/Lib/urllib.py/splittype--crossover with--dataset/ETHPy150Open django/django/tests/decorators/tests.py/MethodDecoratorTests.test_class_decoration