code: def test_nearest_unequal_elements(self, tz):
      dts = pd.to_datetime(
          ["2014-01-01", "2014-01-05", "2014-01-06", "2014-01-09"],
      ).tz_localize(tz)
  
      def t(s):
          return None if s is None else pd.Timestamp(s, tz=tz)
  
      for dt, before, after in (
          ("2013-12-30", None, "2014-01-01"),
          ("2013-12-31", None, "2014-01-01"),
          ("2014-01-01", None, "2014-01-05"),
          ("2014-01-02", "2014-01-01", "2014-01-05"),
          ("2014-01-03", "2014-01-01", "2014-01-05"),
          ("2014-01-04", "2014-01-01", "2014-01-05"),
          ("2014-01-05", "2014-01-01", "2014-01-06"),
          ("2014-01-06", "2014-01-05", "2014-01-09"),
          ("2014-01-07", "2014-01-06", "2014-01-09"),
          ("2014-01-08", "2014-01-06", "2014-01-09"),
          ("2014-01-09", "2014-01-06", None),
          ("2014-01-10", "2014-01-09", None),
          ("2014-01-11", "2014-01-09", None),
      ):
          computed = nearest_unequal_elements(dts, t(dt))
          expected = (t(before), t(after))
          self.assertEqual(computed, expected)
  
file_path: zipline/tests/utils/test_pandas_utils.py
imports: from unittest import skipIf
  import pandas
  from zipline.testing import parameter_space, ZiplineTestCase
  from zipline.testing.predicates import assert_equal
  from zipline.utils.pandas_utils import categorical_df_concat, nearest_unequal_elements, new_pandas, skip_pipeline_new_pandas
label_desc: Use image node_id 1 for calling the TestNearestUnequalElements obj's underlying member method code with example usage: obj.test_nearest_unequal_elements(tz) and returns: unknown