code: public Stream<ImportSnippet> imports() {
          return snippets()
                  .filter(sn -> status(sn).isActive() && sn.kind() == Snippet.Kind.IMPORT)
                  .map(sn -> (ImportSnippet) sn);
      }
docs: Returns the active import snippets.
  This convenience method is equivalent to {@code snippets()} filtered for
  {@link jdk.jshell.Snippet.Status#isActive() status(snippet).isActive()}
  {@code && snippet.kind() == Kind.IMPORT}
  and cast to ImportSnippet.
  @return the active declared import declarations.