StructuredDocString (@NotNull DocStringFormat format, @NotNull Substring content) { return switch (format) { case REST -> new SphinxDocString(content); case EPYTEXT -> new EpydocString(content); case GOOGLE -> new GoogleCodeStyleDocString(content); case NUMPY -> new NumpyDocString(content); case PLAIN -> new PlainDocString(content); }; }