class_docstr: common ops mixin to support a unified interface datetimelike Index
class_docstr_tok: ["common","ops","mixin","to","support","a","unified","interface","datetimelike","Index"]
docstr: Create a comparison method that dispatches to ``cls.values``.
code: def _create_comparison_method(cls, op):
      """
      Create a comparison method that dispatches to ``cls.values``.
      """
  
      def wrapper(self, other):
          if isinstance(other, ABCSeries):
              # the arrays defer to Series for comparison ops but the indexes
              #  don't, so we have to unwrap here.
              other = other._values
  
          result = op(self._data, maybe_unwrap_index(other))
          return result
  
      wrapper.__doc__ = op.__doc__
      wrapper.__name__ = "__{}__".format(op.__name__)
      return wrapper
  
imports: import operator
  import warnings
  import numpy
  from pandas._libs import NaT, iNaT, lib
  from pandas.compat.numpy import function
  from pandas.errors import AbstractMethodError
  from pandas.util._decorators import Appender, cache_readonly, deprecate_kwarg
  from pandas.core.dtypes.common import ensure_int64, is_dtype_equal, is_float, is_integer, is_list_like, is_period_dtype, is_scalar
  from pandas.core.dtypes.generic import ABCIndex, ABCIndexClass, ABCSeries
  from pandas.core import algorithms, ops
  from pandas.core.accessor import PandasDelegate
  from pandas.core.arrays import ExtensionOpsMixin
  from pandas.core.arrays.datetimelike import DatetimeLikeArrayMixin, _ensure_datetimelike_to_i8
  import pandas.core.indexes.base
  from pandas.core.indexes.base import Index, _index_shared_docs
  from pandas.core.tools.timedeltas import to_timedelta
  import pandas.io.formats.printing
label_desc: Use image node_id 5 for calling the DatetimeIndexOpsMixin obj's underlying member method code with example usage: obj._create_comparison_method(cls, op) and returns: wrapper, result