PyType (@Nullable PyCallSiteExpression callSite, @NotNull TypeEvalContext context) { final PyExpression callee = callSite instanceof PyCallExpression ? ((PyCallExpression)callSite).getCallee() : null; final PyExpression qualifier = callee instanceof PyQualifiedExpression ? ((PyQualifiedExpression)callee).getQualifier() : null; return qualifier != null ? context.getType(qualifier) : null; }