code: def check_next_event_indexer(self, events, all_dates, sid, indexer):
      relevant_events = events[events.sid == sid]
      self.assertEqual(len(relevant_events), 2)
  
      ix1, ix2 = relevant_events.index
      e1, e2 = relevant_events["event_date"].dt.tz_localize("UTC")
      t1, t2 = relevant_events["timestamp"].dt.tz_localize("UTC")
  
      for date, computed_index in zip(all_dates, indexer):
          # An event is eligible to be the next event if it's between the
          # timestamp and the event_date, inclusive.
          if t1 <= date <= e1:
              # If e1 is eligible, it should be chosen even if e2 is
              # eligible, since it's earlier.
              self.assertEqual(computed_index, ix1)
          elif t2 <= date <= e2:
              # e2 is eligible and e1 is not, so e2 should be chosen.
              self.assertEqual(computed_index, ix2)
          else:
              # Neither event is eligible.  Return -1 as a sentinel.
              self.assertEqual(computed_index, -1)
  
imports: from datetime import time
  from itertools import product
  from unittest import skipIf
  import blaze
  import numpy
  import pandas
  import pytz
  from zipline.pipeline import Pipeline, SimplePipelineEngine
  from zipline.pipeline.common import EVENT_DATE_FIELD_NAME, TS_FIELD_NAME, SID_FIELD_NAME
  from zipline.pipeline.data import DataSet, Column
  from zipline.pipeline.domain import US_EQUITIES, EquitySessionDomain
  from zipline.pipeline.loaders.events import EventsLoader
  from zipline.pipeline.loaders.blaze.events import BlazeEventsLoader
  from zipline.pipeline.loaders.utils import next_event_indexer, previous_event_indexer
  from zipline.testing import ZiplineTestCase
  from zipline.testing.fixtures import WithAssetFinder, WithTradingSessions
  from zipline.testing.predicates import assert_equal
  from zipline.utils.numpy_utils import categorical_dtype, datetime64ns_dtype, float64_dtype, int64_dtype
  from zipline.utils.pandas_utils import new_pandas, skip_pipeline_new_pandas
label_desc: Use image node_id 5 for calling the EventIndexerTestCase obj's underlying member method code with example usage: obj.check_next_event_indexer(events, all_dates, sid, indexer) without return types