code: def __init__(self, series):
      if (
          not is_datetime64_dtype(series.dtype)
          and not is_datetime64tz_dtype(series.dtype)
          and not is_timedelta64_dtype(series.dtype)
          and not is_period_dtype(series.dtype)
      ):
          raise AttributeError(
              "Can only use .dt accessor with datetimelike values"
          )
      self._series = series
  
imports: from functools import wraps
  from typing import Iterable
  import pandas
  from pandas.api.types import is_datetime64_dtype, is_datetime64tz_dtype, is_timedelta64_dtype, is_period_dtype
  from ...utils import adapt_mars_docstring
  from .string_ import _string_method_to_handlers, SeriesStringMethod
  from .datetimes import _datetime_method_to_handlers, SeriesDatetimeMethod
label_desc: Use image node_id 1 to create a new DatetimeAccessor object  with example: obj = DatetimeAccessor(series)