def METHOD_NAME(self, other, cmp_str, cmp_func):
    @bool_functor("%s %s %s" % (self.attr_name, cmp_str, other.attr_name))
    def HobHob(context):
        return cmp_func(self.attr_getter(context), other.attr_getter(context))
    return HobHob