static List<String> parseYarn(String[] args) {
        String[] params = new String[args.length - 1];
        System.arraycopy(args, 1, params, 0, params.length);
        CommandLine commandLine = parse(YARN_OPTIONS, params);
        if (commandLine.hasOption(OPTION_HELP.getOpt())) {
            printYarnHelp();
            System.exit(0);
        }
        List<String> options = new ArrayList<>();
        options.add(args[0]);
        options.add("-m");
        options.add("yarn-cluster");
        constructYarnOption(options, OPTION_JM_MEMORY, commandLine);
        constructYarnOption(options, OPTION_NAME, commandLine);
        constructYarnOption(options, OPTION_QUEUE, commandLine);
        constructYarnOption(options, OPTION_SLOTS, commandLine);
        constructYarnOption(options, OPTION_TM_MEMORY, commandLine);
        return options;
    }
@Test
    void testParseYarnWithOptions() {
        String[] args = {"yarn", "-jm", "1024m", "-tm", "4096m"};
        List<String> commandOptions = PythonShellParser.parseYarn(args);
        String[] expectedCommandOptions = {
            "yarn", "-m", "yarn-cluster", "-yjm", "1024m", "-ytm", "4096m"
        };
        assertThat(commandOptions.toArray()).isEqualTo(expectedCommandOptions);
    }