code: def test_normalize_to_query_time(self, expected, tz, dates):
      # Order matters in pandas 0.18.2. Prior to that, using tz_convert on
      # a DatetimeIndex with DST/EST timestamps mixed resulted in some of
      # them being an hour off (1 hour past midnight).
      for scrambler in self.combos:
          df = pd.DataFrame({"timestamp": dates[scrambler]})
          result = normalize_timestamp_to_query_time(
              df, time(8, 45), tz, inplace=False, ts_field="timestamp"
          )
  
          timestamps = result["timestamp"].values
          check_arrays(
              np.sort(timestamps), np.sort(expected[scrambler])
          )
  
imports: from datetime import time
  import itertools
  from itertools import product
  import blaze
  from nose_parameterized import parameterized
  import numpy
  import pandas
  from catalyst.pipeline import Pipeline, SimplePipelineEngine
  from catalyst.pipeline.common import EVENT_DATE_FIELD_NAME, TS_FIELD_NAME, SID_FIELD_NAME
  from catalyst.pipeline.data import DataSet, Column
  from catalyst.pipeline.loaders.events import EventsLoader
  from catalyst.pipeline.loaders.blaze.events import BlazeEventsLoader
  from catalyst.pipeline.loaders.utils import next_event_indexer, normalize_timestamp_to_query_time, previous_event_indexer
  from catalyst.testing import check_arrays, CatalystTestCase
  from catalyst.testing.fixtures import WithAssetFinder, WithTradingSessions
  from catalyst.testing.predicates import assert_equal
  from catalyst.utils.numpy_utils import categorical_dtype, datetime64ns_dtype, float64_dtype, int64_dtype
label_desc: Use image node_id 1 for calling the EventLoaderUtilsTestCase obj's underlying member method code with example usage: obj.test_normalize_to_query_time(expected, tz, dates) without return types