code: def _convert_bin_to_numeric_type(bins, dtype):
      """
      if the passed bin is of datetime/timedelta type,
      this method converts it to integer
  
      Parameters
      ----------
      bins : list-like of bins
      dtype : dtype of data
  
      Raises
      ------
      ValueError if bins are not of a compat dtype to dtype
      """
      bins_dtype = infer_dtype(bins, skipna=False)
      if is_timedelta64_dtype(dtype):
          if bins_dtype in ["timedelta", "timedelta64"]:
              bins = to_timedelta(bins).view(np.int64)
          else:
              raise ValueError("bins must be of timedelta64 dtype")
      elif is_datetime64_dtype(dtype) or is_datetime64tz_dtype(dtype):
          if bins_dtype in ["datetime", "datetime64"]:
              bins = to_datetime(bins).view(np.int64)
          else:
              raise ValueError("bins must be of datetime64 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 6 for calling a global function with example usage: _convert_bin_to_numeric_type(bins, dtype) and returns: bins