code: def assert_timestamp_and_datetime_equal(
      result,
      expected,
      path=(),
      msg="",
      allow_datetime_coercions=False,
      compare_nat_equal=True,
      **kwargs,
  ):
      """
      Branch for comparing python datetime (which includes pandas Timestamp) and
      np.datetime64 as equal.
  
      Returns raises unless ``allow_datetime_coercions`` is passed as True.
      """
      assert allow_datetime_coercions or type(result) == type(
          expected
      ), (
          "%sdatetime types (%s, %s) don't match and "
          "allow_datetime_coercions was not set.\n%s"
          % (
              _fmt_msg(msg),
              type(result),
              type(expected),
              _fmt_path(path),
          )
      )
  
      if isinstance(result, pd.Timestamp) and isinstance(
          expected, pd.Timestamp
      ):
          assert_equal(
              result.tz,
              expected.tz,
              path=path + (".tz",),
              msg=msg,
              **kwargs,
          )
  
      result = pd.Timestamp(result)
      expected = pd.Timestamp(expected)
      if (
          compare_nat_equal
          and pd.isnull(result)
          and pd.isnull(expected)
      ):
          return
  
      assert_equal.dispatch(object, object)(
          result, expected, path=path, msg=msg, **kwargs
      )
  
imports: from collections import OrderedDict
  from contextlib import contextmanager
  import datetime
  from functools import partial
  import re
  from nose.tools import assert_almost_equal, assert_almost_equals, assert_dict_contains_subset, assert_false, assert_greater, assert_greater_equal, assert_in, assert_is, assert_is_instance, assert_is_none, assert_is_not, assert_is_not_none, assert_less, assert_less_equal, assert_multi_line_equal, assert_not_almost_equal, assert_not_almost_equals, assert_not_equal, assert_not_equals, assert_not_in, assert_not_is_instance, assert_raises, assert_raises_regexp, assert_regexp_matches, assert_true, assert_tuple_equal
  import numpy
  import pandas
  from pandas.util.testing import assert_frame_equal, assert_panel_equal, assert_series_equal, assert_index_equal
  from six import iteritems, viewkeys, PY2
  from six.moves import zip_longest
  from toolz import dissoc, keyfilter
  import toolz.curried.operator
  from zipline.assets import Asset
  from zipline.dispatch import dispatch
  from zipline.lib.adjustment import Adjustment
  from zipline.lib.labelarray import LabelArray
  from zipline.testing.core import ensure_doctest
  from zipline.utils.compat import getargspec, mappingproxy
  from zipline.utils.formatting import s
  from zipline.utils.functional import dzip_exact, instance
  from zipline.utils.math_utils import tolerant_equals
  from zipline.utils.numpy_utils import assert_array_compare, compare_datetime_arrays
label_desc: Use image node_id 26 for calling a global function with example usage: assert_timestamp_and_datetime_equal(result, expected, path, msg, allow_datetime_coercions, compare_nat_equal) without return types