def _is_leader(locale, user):
    from kitsune.wiki.models import Locale
    try:
        locale_team = Locale.objects.get(locale=locale)
    except Locale.DoesNotExist:
        log.warning('Locale not created for %s' % locale)
        return False

    return user in locale_team.leaders.all()
Checks if the user is a leader for the given locale.
dataset/ETHPy150Open mozilla/kitsune/kitsune/wiki/permissions.py/_is_leader