def genl_ctrl_grp_by_name(family, grp_name):
for grp in nl_list_for_each_entry(genl_family_grp(), family.gf_mc_grps, '<STR_LIT>'):<EOL><INDENT>if grp.name == grp_name:<EOL><INDENT>return grp.id_<EOL><DEDENT><DEDENT>return -NLE_OBJ_NOTFOUND<EOL>
https://github.com/thom311/libnl/blob/libnl3_2_25/lib/genl/ctrl.c#L446.

    Positional arguments:
    family -- genl_family class instance.
    grp_name -- bytes.

    Returns:
    group ID or negative error code.