def METHOD_NAME(
    SX1: BaseSorting, SX2: BaseSorting, check_annotations: bool = False, check_properties: bool = False
) -> None:
    assert SX1.get_num_segments() == SX2.get_num_segments()
    # TODO for later  use to_spike_vector() to do this without looping
    for segment_idx in range(SX1.get_num_segments()):
        # get_unit_ids
        ids1 = np.sort(np.array(SX1.get_unit_ids()))
        ids2 = np.sort(np.array(SX2.get_unit_ids()))
        assert_array_equal(ids1, ids2)
        for id in ids1:
            train1 = np.sort(SX1.get_unit_spike_train(id, segment_index=segment_idx))
            train2 = np.sort(SX2.get_unit_spike_train(id, segment_index=segment_idx))
            assert np.array_equal(train1, train2)
    if check_annotations:
        check_extractor_annotations_equal(SX1, SX2)
    if check_properties:
        check_extractor_properties_equal(SX1, SX2)