private boolean isFormat(@Nullable PsiFile file, @NotNull DocStringFormat format) {
    return file instanceof PyAstFile ? getFormatForFile(file) == format : getState().getFormat() == format;
  }
private boolean isFormat(@Nullable PsiFile file, @NotNull DocStringFormat format)