def METHOD_NAME(self, user, group):
    # make sure the target object is a group and user is a coach for the group
    return (
        group.kind == LEARNERGROUP or group.kind == ADHOCLEARNERSGROUP
    ) and user.has_role_for_collection(COACH, group)