def METHOD_NAME(user, locale=None):
    """
    Can the given user delete documents or review revisions. If an optional locale is
    provided, will perform the extra check of whether the user is a leader or reviewer
    within that locale team.
    """
    if locale and (_is_leader(locale, user) or _is_reviewer(locale, user)):
        return True
    # Fallback to the django permissions.
    return user.has_perm("wiki.review_revision") or user.has_perm("wiki.delete_document")