(username, groupname)
Ensure given user is *not* a member of given group
Ensure given user is *not* a member of given group
Ensure given user is * not * a member of given group
def remove_user_group(username, groupname):
    """
    Ensure given user is *not* a member of given group
    """
    group = grp.getgrnam(groupname)
    if username not in group.gr_mem:
        return

    subprocess.check_call(["gpasswd", "--delete", username, groupname])
def remove_user_group ( username , groupname ) : group = grp . getgrnam ( groupname ) if username not in group . gr_mem : return subprocess . check_call ( [ "gpasswd" , "--delete" , username , groupname ] )