code: def test_split_merge():
      ev = np.array(
          [
              0,
              0,
              0,
              1,
              1,
              1,
              2,
              2,
              2,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              3,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
              4,
          ]
      )
      random_state = np.random.RandomState(0)
      ev_pat = random_state.rand(5, 10)
      D = np.zeros((len(ev), 10))
      for t in range(len(ev)):
          D[t, :] = ev_pat[ev[t], :] + 0.1 * random_state.rand(10)
  
      hmm_sm = EventSegment(
          5, split_merge=True, split_merge_proposals=2
      )
      hmm_sm.fit(D)
      hmm_events = np.argmax(hmm_sm.segments_[0], axis=1)
  
      assert np.all(
          ev == hmm_events
      ), "Merge/split fails to find highly uneven events"
  
file_path: brainiak/tests/eventseg/test_event.py
imports: from brainiak.eventseg.event import EventSegment
  from scipy.special import comb
  import numpy
  import pytest
  from sklearn.exceptions import NotFittedError
label_desc: Use image node_id 9 for calling a global function with example usage: test_split_merge() without return types