def _shorten_lbls(testres, lbl):
    '\n        hacky function\n        '
    import re
    repl_list = [('candidacy_', ''), ('viewpoint_compare', 'viewpoint'), ('fg_on=True', 'FG=True'), ('fg_on=False,?', 'FG=False'), ('lnbnn_on=True', 'LNBNN'), ('lnbnn_on=False,?', ''), ('normonly_on=True', 'normonly'), ('normonly_on=False,?', ''), ('bar_l2_on=True', 'dist'), ('bar_l2_on=False,?', ''), ('joinme=\\d+,?', ''), ('dcrossval_enc', 'denc_per_name'), ('sv_on', 'SV'), ('rotation_invariance', 'RI'), ('affine_invariance', 'AI'), ('query_rotation_heuristic', 'QRH'), ('nNameShortlistSVER', 'nRR'), ('sample_per_ref_name', 'per_gt_name'), ('require_timestamp=True', 'require_timestamp'), ('require_timestamp=False,?', ''), ('require_timestamp=None,?', ''), ('[_A-Za-z]*=None,?', ''), ('dpername=None,?', ''), ("prescore_method='?csum'?,score_method='?csum'?,?", 'mech=annot'), ("prescore_method='?nsum'?,score_method='?nsum'?,?", 'mech=name'), ('force_const_size=[^,]+,?', ''), ('[dq]?_true_size=\\d+,?', ''), ('[dq]?_orig_size=[^,]+,?', ''), ((('[qd]?exclude_reference=' + ut.regex_or(['True', 'False', 'None'])) + '\\,?'), ''), ('=True', '=T'), ('=False', '=F'), (',$', '')]
    for (ser, rep) in repl_list:
        lbl = re.sub(ser, rep, lbl)
    return lbl
hacky function
def _shorten_lbls(testres, lbl):
    '\n        \n        '
    import re
    repl_list = [('candidacy_', ), ('viewpoint_compare', 'viewpoint'), ('fg_on=True', 'FG=True'), ('fg_on=False,?', 'FG=False'), ('lnbnn_on=True', 'LNBNN'), ('lnbnn_on=False,?', ), ('normonly_on=True', 'normonly'), ('normonly_on=False,?', ), ('bar_l2_on=True', 'dist'), ('bar_l2_on=False,?', ), ('joinme=\\d+,?', ), ('dcrossval_enc', 'denc_per_name'), ('sv_on', 'SV'), ('rotation_invariance', 'RI'), ('affine_invariance', 'AI'), ('query_rotation_heuristic', 'QRH'), ('nNameShortlistSVER', 'nRR'), ('sample_per_ref_name', 'per_gt_name'), ('require_timestamp=True', 'require_timestamp'), ('require_timestamp=False,?', ), ('require_timestamp=None,?', ), ('[_A-Za-z]*=None,?', ), ('dpername=None,?', ), ("prescore_method='?csum'?,score_method='?csum'?,?", 'mech=annot'), ("prescore_method='?nsum'?,score_method='?nsum'?,?", 'mech=name'), ('force_const_size=[^,]+,?', ), ('[dq]?_true_size=\\d+,?', ), ('[dq]?_orig_size=[^,]+,?', ), ((('[qd]?exclude_reference=' + ut.regex_or(['True', 'False', 'None'])) + '\\,?'), ), ('=True', '=T'), ('=False', '=F'), (',$', )]
    for (ser, rep) in repl_list:
        lbl = re.sub(ser, rep, lbl)
    return lbl