def METHOD_NAME(self, other, ignore_swagger_spec=False):
    # type: (typing.Any, bool) -> bool
    """
    Compare self with `other`
    NOTE: Not implemented as __eq__ otherwise we would need to implement __hash__ to preserve
        hashability of the class and it would not necessarily be performance effective
    :param other: instance to compare self against
    :param ignore_swagger_spec: skip equality check of swagger_spec attribute.
        This is useful as equality checks do not play well with recursive definitions.
    :return: True if self and other are the same, False otherwise
    """
    if id(self) == id(other):
        return True
    if not isinstance(other, self.__class__):
        return False
    if self.name != other.name:
        return False
    for operation_id in set(chain(iterkeys(self.operations), iterkeys(other.operations))):
        operation = self.operations.get(operation_id)
        if operation is None or not operation.METHOD_NAME(
            other.operations.get(operation_id), ignore_swagger_spec=ignore_swagger_spec,
        ):
            return False
    return True