human
I wrote the below code

    global _translations
    t = _translations.get(language, None)
    if (t is not None):
        return t
    from django.conf import settings
    klass = DjangoTranslation
    if (sys.version_info < (2, 4)):
        klass = DjangoTranslation23
    globalpath = os.path.join(os.path.dirname(sys.modules[settings.__module__].__file__), 'locale')
    if (settings.SETTINGS_MODULE is not None):
        parts = settings.SETTINGS_MODULE.split('.')
        project = __import__(parts[0], {}, {}, [])
        projectpath = os.path.join(os.path.dirname(project.__file__), 'locale')
    else:
        projectpath = None
    def _fetch(lang, fallback=None):
        global _translations
        loc = to_locale(lang)
        res = _translations.get(lang, None)
        if (res is not None):
            return res
        def _translation(path):
            try:
                t = gettext_module.translation('django', path, [loc], klass)
                t.set_language(lang)
                return t
            except IOError as e:
                return None
        res = _translation(globalpath)
        def _merge(path):
            t = _translation(path)
            if (t is not None):
                if (res is None):
                    return t
                else:
                    res.merge(t)
            return res
        if hasattr(settings, 'LOCALE_PATHS'):
            for localepath in settings.LOCALE_PATHS:
                if os.path.isdir(localepath):
                    res = _merge(localepath)
        if (projectpath and os.path.isdir(projectpath)):
            res = _merge(projectpath)
        for appname in settings.INSTALLED_APPS:
            p = appname.rfind('.')
            if (p >= 0):
                app = getattr(__import__(appname[:p], {}, {}, [appname[(p + 1):]]), appname[(p + 1):])
            else:
                app = __import__(appname, {}, {}, [])
            apppath = os.path.join(os.path.dirname(app.__file__), 'locale')
            if os.path.isdir(apppath):
                res =...

What's a good function header?
assistant
#Here's a good function header.

def translation(language):