code: def _make_operator(name, func):
      """
      Create operator method.
      """
  
      def method(self, other):
          if not self._is_comparable_to(other):
              return NotImplemented
  
          result = func(self.value, other.value)
          if result is NotImplemented:
              return NotImplemented
  
          return result
  
      method.__name__ = "__%s__" % (name,)
      method.__doc__ = "Return a %s b.  Computed by attrs." % (
          _operation_names[name],
      )
  
      return method
  
file_path: catboost/contrib/python/attrs/py2/attr/_cmp.py
imports: from __future__ import absolute_import, division, print_function
  import functools
  from ._compat import new_class
  from ._make import _make_ne
label_desc: Use image node_id 3 for calling a global function with example usage: _make_operator(name, func) and returns: method, result, NotImplemented, NotImplemented