def METHOD_NAME(veto_def, ifo, server, veto_name, start_default, end_default):
    """ Cycle through the veto name string and collect the vetoes for the
    selected categories. Return the final segment list
    """
    raise ValueError("This code needs updating to work with the new segment "
                     "interface. If it's still used please fix this, "
                     "otherwise we can just remove this code.")
    veto_segments = ligo.segments.segmentlist([])
    for cat in veto_name:
        #cat = convert_cat(cat)
        flags = veto_def[ifo][cat]
        for flag in flags:
            start = flag['start'] if flag['start'] >= start_default else start_default
            end = flag['end'] if flag['end'] !=0 else end_default
            raw_segs = sane(query("https", server, ifo,
                                  flag['name'], flag['version'],
                                  'active', start, end)[0]['active'])
            for rseg in raw_segs:
                s, e = rseg[0] + flag['start_pad'], rseg[1] + flag['end_pad']
                veto_segments.append(ligo.segments.segment(s, e))
    return veto_segments.coalesce()