public static @NotNull Document createDocument(final @NotNull Project project,
                                                 @NotNull String text) {
    text = text.trim();
    final PyExpressionCodeFragmentImpl fragment = new PyExpressionCodeFragmentImpl(project, "start_script.py", text, true);

    return PsiDocumentManager.getInstance(project).getDocument(fragment);
  }
public static @NotNull Document createDocument(final @NotNull Project project,
                                                 @NotNull String text)