<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def admin_required(group):
 """Decorator that requires the user to be in a certain admin group. For example, @admin_required("polls") would check whether a user is in the "admin_polls" group or in the "admin_all" group. """


    def in_admin_group(user):
        return user.is_authenticated and user.has_admin_permission(group)

    return user_passes_test(in_admin_group)