private Set<String> getSortedAndFilteredImports() {
        return imports.values()
                .stream()
                .filter(s -> s.size() == 1)
                .map(s -> s.iterator().next())
                .filter(s -> !s.getNamespace().startsWith("java.lang"))
                .filter(s -> !s.getNamespace().equals(namespace))
                .map(Symbol::getFullName)
                .collect(Collectors.toCollection(TreeSet::new));
    }
Sort imports then filter out any instances of duplicates. Then filter out and instances of base java classes
that do not need to be imported. Finally, filter out cases where the symbol has the same namespace as the file.

@return sorted list of imports
smithy-trait-codegen/src/main/java/software/amazon/smithy/traitcodegen/writer/TraitCodegenImportContainer.java