def is_effective_group(group_id_or_name):
 egid = os.getegid()
 if (str(group_id_or_name) == str(egid)):
  return True
 effective_group_name = grp.getgrgid(egid).gr_name
 return (group_id_or_name == effective_group_name)

def is_effective_group ( group_id_or_name ) : egid = os . getegid ( ) if ( str ( group_id_or_name ) == str ( egid ) ) : return True effective_group_name = grp . getgrgid ( egid ) . gr_name return ( group_id_or_name == effective_group_name )
returns true if group_id_or_name is effective group .