code: public static SettingsSamples get(Map<String, String[]> clArgs)
      {
          String[] params = clArgs.remove("-sample");
          if (params == null)
          {
              return new SettingsSamples(new SampleOptions());
          }
          SampleOptions options = GroupedOptions.select(params, new SampleOptions());
          if (options == null)
          {
              printHelp();
              System.out.println("Invalid -sample options provided, see output for valid options");
              System.exit(1);
          }
          return new SettingsSamples(options);
      }
docs: CLI Utility Methods