code: def _convert_bin_to_datelike_type(bins, dtype):
      """
      Convert bins to a DatetimeIndex or TimedeltaIndex if the orginal dtype is
      datelike
  
      Parameters
      ----------
      bins : list-like of bins
      dtype : dtype of data
  
      Returns
      -------
      bins : Array-like of bins, DatetimeIndex or TimedeltaIndex if dtype is
             datelike
      """
      if is_datetime64tz_dtype(dtype):
          bins = to_datetime(
              bins.astype(np.int64), utc=True
          ).tz_convert(dtype.tz)
      elif is_datetime_or_timedelta_dtype(dtype):
          bins = Index(bins.astype(np.int64), dtype=dtype)
      return bins
  
file_path: catboost/contrib/python/pandas/py2/pandas/core/reshape/tile.py
imports: from functools import partial
  import numpy
  from pandas._libs.lib import infer_dtype
  from pandas.core.dtypes.common import _NS_DTYPE, ensure_int64, is_categorical_dtype, is_datetime64_dtype, is_datetime64tz_dtype, is_datetime_or_timedelta_dtype, is_integer, is_scalar, is_timedelta64_dtype
  from pandas.core.dtypes.missing import isna
  from pandas import Categorical, Index, Interval, IntervalIndex, Series, Timedelta, Timestamp, to_datetime, to_timedelta
  import pandas.core.algorithms
  import pandas.core.nanops
label_desc: Use image node_id 7 for calling a global function with example usage: _convert_bin_to_datelike_type(bins, dtype) and returns: bins