code: def test_sym():
      es = EventSegment(4)
  
      evpat = np.repeat(np.arange(10).reshape(-1, 1), 4, axis=1)
      es.set_event_patterns(evpat)
  
      D = np.repeat(np.arange(10).reshape(1, -1), 20, axis=0)
      ev = es.find_events(D, var=1)[0]
  
      # Check that events 1-4 and 2-3 are symmetric
      assert np.all(
          np.isclose(ev[:, :2], np.fliplr(np.flipud(ev[:, 2:])))
      ), "Fit with constant data is not symmetric"
  
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 6 for calling a global function with example usage: test_sym() without return types