PyParamSpecType (@Nullable PyCallableParameter positionalContainer, @Nullable PyCallableParameter keywordContainer) { if (positionalContainer == null && keywordContainer == null) return null; PyCallableParameter container = Objects.requireNonNullElse(positionalContainer, keywordContainer); return as(container.getType(myTypeEvalContext), PyParamSpecType.class); }