code: def _coerce_to_type(x):
      """
      if the passed data is of datetime/timedelta type,
      this method converts it to numeric so that cut method can
      handle it
      """
      dtype = None
  
      if is_datetime64tz_dtype(x):
          dtype = x.dtype
      elif is_datetime64_dtype(x):
          x = to_datetime(x)
          dtype = np.dtype("datetime64[ns]")
      elif is_timedelta64_dtype(x):
          x = to_timedelta(x)
          dtype = np.dtype("timedelta64[ns]")
  
      if dtype is not None:
          # GH 19768: force NaT to NaN during integer conversion
          x = np.where(x.notna(), x.view(np.int64), np.nan)
  
      return x, dtype
  
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 5 for calling a global function with example usage: _coerce_to_type(x) and returns: x,  dtype