default String renderImports(Generator gen, M model) {
        final List<String> customImports         = new ArrayList<>();
        final List<String> standardImports       = new ArrayList<>();
        final List<String> staticImports         = new ArrayList<>();
        final List<String> staticStandardImports = new ArrayList<>();

        gen.onEach(importsOf(model))
            .distinct().sorted()
            .forEachOrdered(line ->
                TraitUtil.renderImportToLists(customImports, standardImports, staticImports, staticStandardImports, line)
            );

        final StringJoiner result = new StringJoiner(Formatting.nl());
        customImports.forEach(result::add);
        if (!customImports.isEmpty() && !standardImports.isEmpty()) {
            result.add("");
        }
        standardImports.forEach(result::add);
        if (!standardImports.isEmpty() && (staticImports.size() + staticStandardImports.size()) > 0) {
            result.add("");
        }
        staticImports.forEach(result::add);
        staticStandardImports.forEach(result::add);
        if (result.length() > 0) {
            result.add(Formatting.nl());
        }

        return result.toString();
    }
Render the imports-part of the model separated by new-line characters and
appended by two new-line characters.

@param gen    the generator
@param model  the model
@return       the generated code
common-parent/codegen/src/main/java/com/speedment/common/codegen/internal/java/view/trait/HasImportsView.java