code: def get_time_unit(obj):
      if isinstance(
          obj,
          (
              cudf.core.column.datetime.DatetimeColumn,
              cudf.core.column.timedelta.TimeDeltaColumn,
          ),
      ):
          return obj.time_unit
  
      time_unit, _ = np.datetime_data(obj.dtype)
      return time_unit
  
imports: import datetime
  from collections import namedtuple
  from decimal import Decimal
  import cupy
  import numpy
  import pandas
  import pyarrow
  from pandas.core.dtypes.common import infer_dtype_from_object
  import cudf
  from cudf._typing import DtypeObj
  from cudf.api.types import is_bool, is_float, is_integer
label_desc: Use image node_id 17 for calling a global function with example usage: get_time_unit(obj) and returns: time_unit, obj