code: def _cmd_for_base_args(base_args, group):
      cmd = group
      for arg in base_args:
          try:
              cmd = cmd.commands[arg]
          except KeyError:
              break
      return cmd
  
imports: import argparse
  import json
  import logging
  import os
  import subprocess
  import sys
  import click
  from guild import python_util
  from guild import util
  from .None import import_argparse_flags_main
  from .None import python_script
label_desc: Use image node_id 6 for calling a global function with example usage: _cmd_for_base_args(base_args, group) and returns: cmd