code: def _sort_args(args: Iterable[Arg]) -> Iterable[Arg]:
      """Sort subcommand optional args, keep positional args."""
  
      def get_long_option(arg: Arg):
          """Get long option from Arg.flags."""
          return arg.flags[0] if len(arg.flags) == 1 else arg.flags[1]
  
      positional, optional = partition(
          lambda x: x.flags[0].startswith("-"), args
      )
      yield from positional
      yield from sorted(
          optional, key=lambda x: get_long_option(x).lower()
      )
  
imports: from __future__ import annotations
  import argparse
  import logging
  import sys
  from argparse import Action
  from collections import Counter
  from functools import lru_cache
  from typing import TYPE_CHECKING, Iterable
  import lazy_object_proxy
  from rich_argparse import RawTextRichHelpFormatter, RichHelpFormatter
  from airflow.cli.cli_config import DAG_CLI_DICT, ActionCommand, DefaultHelpParser, GroupCommand, core_commands
  from airflow.cli.utils import CliConflictError
  from airflow.exceptions import AirflowException
  from airflow.executors.executor_loader import ExecutorLoader
  from airflow.utils.helpers import partition
  from airflow.www.extensions.init_auth_manager import get_auth_manager_cls
label_desc: Use image node_id 2 for calling a global function with example usage: _sort_args(args) and returns: unknown