void () { PsiElement targetElement = resolve(); PyExpression assigned = ((PyAssignmentStatement)targetElement.getContext()).getAssignedValue(); assertInstanceOf(assigned, PyCallExpression.class); PsiElement callee = ((PyCallExpression)assigned).getCallee(); assertInstanceOf(callee, PySubscriptionExpression.class); }