code: def parse_args(args):
      parser = argparse.ArgumentParser(
          description="Set a test matrix for the cross version tests"
      )
      parser.add_argument(
          "--versions-yaml",
          required=False,
          default="mlflow/ml-package-versions.yml",
          help=(
              "URL or local file path of the config yaml. Defaults to "
              "'mlflow/ml-package-versions.yml' on the branch where this script is running."
          ),
      )
      parser.add_argument(
          "--ref-versions-yaml",
          required=False,
          default=None,
          help=(
              "URL or local file path of the reference config yaml which will be compared with the "
              "config specified by `--versions-yaml` in order to identify the config updates."
          ),
      )
      parser.add_argument(
          "--changed-files",
          type=lambda x: []
          if x.strip() == ""
          else x.strip().split("\n"),
          required=False,
          default=None,
          help=("A string that represents a list of changed files"),
      )
  
      parser.add_argument(
          "--flavors",
          required=False,
          type=split_by_comma,
          help=(
              "Comma-separated string specifying which flavors to test (e.g. 'sklearn, xgboost'). "
              "If unspecified, all flavors are tested."
          ),
      )
      parser.add_argument(
          "--versions",
          required=False,
          type=split_by_comma,
          help=(
              "Comma-separated string specifying which versions to test (e.g. '1.2.3, 4.5.6'). "
              "If unspecified, all versions are tested."
          ),
      )
      parser.add_argument(
          "--no-dev",
          action="store_true",
          default=False,
          help="If True, exclude dev versions in the test matrix.",
      )
      parser.add_argument(
          "--only-latest",
          action="store_true",
          default=False,
          help=(
              "If True, only test the latest version of each group. Useful when you want to avoid "
              "running too many GitHub Action jobs."
          ),
      )
  
      return parser.parse_args(args)
  
imports: import argparse
  import functools
  import json
  import os
  import re
  import shutil
  import sys
  import typing
  from collections import defaultdict
  import requests
  import yaml
  from packaging.specifiers import SpecifierSet
  from packaging.version import InvalidVersion
  from packaging.version import Version
  from pydantic import BaseModel, validator
label_desc: Use image node_id 11 for calling a global function with example usage: parse_args(args) and returns: parser