Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
events,
fs,
break_start_code,
break_stop_code,
name_to_start_codes,
name_to_stop_codes,
min_break_length_ms,
max_break_length_ms,
break_start_offset_ms,
break_stop_offset_ms,
expected_events,
):
events = np.array(events)
name_to_start_codes = OrderedDict(name_to_start_codes)
name_to_stop_codes = OrderedDict(name_to_stop_codes)
events_with_breaks = add_breaks(
events, fs, break_start_code, break_stop_code, name_to_start_codes,
name_to_stop_codes, min_break_length_ms=min_break_length_ms,
max_break_length_ms=max_break_length_ms,
break_start_offset_ms=break_start_offset_ms, break_stop_offset_ms=break_stop_offset_ms)
np.testing.assert_array_equal(events_with_breaks,
expected_events)