code: def _gen_func(cls, method, is_property):
      @wraps(getattr(pd.Series.dt, method))
      def _inner(self, *args, **kwargs):
          op = SeriesDatetimeMethod(
              method=method,
              is_property=is_property,
              method_args=args,
              method_kwargs=kwargs,
          )
          return op(self._series)
  
      _inner.__doc__ = adapt_mars_docstring(
          getattr(pd.Series.dt, method).__doc__
      )
      return _inner
  
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 2 for calling the DatetimeAccessor obj's underlying member method code with example usage: obj._gen_func(cls, method, is_property) and returns: _inner, op