@Override
  public void apply(@NotNull CodeStyleSettings settings) {
    final PyCodeStyleSettings pySettings = settings.getCustomSettings(PyCodeStyleSettings.class);

    pySettings.OPTIMIZE_IMPORTS_SORT_IMPORTS = mySortImports.isSelected();
    pySettings.OPTIMIZE_IMPORTS_SORT_NAMES_IN_FROM_IMPORTS = mySortNamesInFromImports.isSelected();
    pySettings.OPTIMIZE_IMPORTS_SORT_BY_TYPE_FIRST = mySortImportsByTypeFirst.isSelected();
    pySettings.OPTIMIZE_IMPORTS_JOIN_FROM_IMPORTS_WITH_SAME_SOURCE = myJoinFromImportsWithSameSource.isSelected();
    pySettings.OPTIMIZE_IMPORTS_ALWAYS_SPLIT_FROM_IMPORTS = myAlwaysSplitFromImports.isSelected();
    pySettings.OPTIMIZE_IMPORTS_CASE_INSENSITIVE_ORDER = mySortCaseInsensitively.isSelected();
  }
@Override
  public void apply(@NotNull CodeStyleSettings settings)