def filter_type_one_fault_results(type_one_faults, relay_timeseries):
    """
       type_one_fault_check can return a lot of points.  All most people care about is the fault type and (probably) start and end time (if applicable).  This does the filtering to return such a list
    """
    from Hard_Fault import Hard_Fault
    res = []
    if not type_one_faults or len(type_one_faults) == 0:
        return []
    if len(type_one_faults) == 1:
        relay_status_pt, fault_text = type_one_faults[0]
        res.append(Hard_Fault(relay_status_pt.time, relay_status_pt.time,
            fault_text))
        return res
    cur_fault_points = [type_one_faults[0]]
    idx = 1
    while idx < len(type_one_faults):
        cur_fault_relay_pt, cur_fault_txt = type_one_faults[idx]
        last_fault_relay_pt, last_fault_txt = cur_fault_points[-1]
        cur_fault_relay_idx = relay_timeseries.index((cur_fault_relay_pt.
            time, cur_fault_relay_pt.value))
        last_fault_relay_idx = relay_timeseries.index((last_fault_relay_pt.
            time, last_fault_relay_pt.value))
        if (cur_fault_relay_idx != last_fault_relay_idx + 1 or 
            cur_fault_txt != last_fault_txt):
            res.append(Hard_Fault(cur_fault_points[0][0].time,
                cur_fault_points[-1][0].time, last_fault_txt))
            cur_fault_points = [type_one_faults[idx]]
            idx += 1
        else:
            cur_fault_points.append((cur_fault_relay_pt, cur_fault_txt))
            idx += 1
    if len(cur_fault_points) > 0:
        res.append(Hard_Fault(cur_fault_points[0][0].time, cur_fault_points
            [-1][0].time, last_fault_txt))
    return res
