code: def test_cut_bins_datetime_intervalindex():
      # https://github.com/pandas-dev/pandas/issues/46218
      bins = interval_range(
          Timestamp("2022-02-25"), Timestamp("2022-02-27"), freq="1D"
      )
      # passing Series instead of list is important to trigger bug
      result = cut(
          Series([Timestamp("2022-02-26")]).astype("M8[ns]"), bins=bins
      )
      expected = Categorical.from_codes([0], bins, ordered=True)
      tm.assert_categorical_equal(result.array, expected)
  
imports: import numpy
  import pytest
  import pandas
  from pandas import Categorical, DataFrame, DatetimeIndex, Index, Interval, IntervalIndex, Series, TimedeltaIndex, Timestamp, cut, date_range, interval_range, isna, qcut, timedelta_range, to_datetime
  import pandas._testing
  from pandas.api.types import CategoricalDtype
  import pandas.core.reshape.tile
label_desc: Use image node_id 49 for calling a global function with example usage: test_cut_bins_datetime_intervalindex() without return types