def _equals_for_highlighting_purposes(self, other):
        """

        :param OperandDescriptor other: The other operand to compare with.
        :return:
        """

        if other is None:
            return False

        highlight_mode = self.infodock.highlight_mode

        if highlight_mode == OperandHighlightMode.SAME_TEXT or self.variable is None:
            # when there is no related variable, we highlight as long as they have the same text
            return other.text == self.text
        elif (
            highlight_mode == OperandHighlightMode.SAME_IDENT
            and self.variable is not None
            and other.variable_ident is not None
        ):
            return self.func_addr == other.func_addr and self.variable.ident == other.variable_ident

        return False


        :param OperandDescriptor other: The other operand to compare with.
        :return:
        
angrmanagement/ui/widgets/qoperand.py