void (@Nullable PyExpression condition, boolean result) { final PyExpression actualExpression; final boolean negation; if (condition instanceof PyPrefixExpression prefixExpression && prefixExpression.getOperator() == PyTokenTypes.NOT_KEYWORD) { actualExpression = prefixExpression.getOperand(); negation = true; } else { actualExpression = condition; negation = false; } var function = expressionToGuards.get(actualExpression); if ((negation && !result || !negation && result) && function != null && actualExpression instanceof PyCallExpression callExpression) { final var evaluator = new PyTypeAssertionEvaluator(); evaluator.handleTypeGuardCall(callExpression, function); InstructionBuilder.addAssertInstructions(myBuilder, evaluator); } }