def adapt_sum(line, cfg, filter_obj):
    """Determine best filter by sum of all row values"""
    lines = filter_obj.filter_all(line)
    res_s = [sum(it) for it in lines]
    r = res_s.index(min(res_s))
    return lines[r]
def adapt_sum ( line , cfg , filter_obj ) : lines = filter_obj . filter_all ( line ) res_s = [ sum ( it ) for it in lines ] r = res_s . index ( min ( res_s ) ) return lines [ r ]
Determine best filter by sum of all row values