code: def action_is_greedy(action, isoptional=False):
      """Returns True if action will necessarily consume the next argument.
      isoptional indicates whether the argument is an optional (starts with -).
      """
      num_consumed_args = _num_consumed_args.get(action, 0)
  
      if action.option_strings:
          if not isoptional and not action_is_satisfied(action):
              return True
          return action.nargs == REMAINDER
      else:
          return action.nargs == REMAINDER and num_consumed_args >= 1
  
file_path: catboost/contrib/python/argcomplete/py3/argcomplete/packages/_argparse.py
imports: from argparse import ONE_OR_MORE, OPTIONAL, PARSER, REMAINDER, SUPPRESS, ZERO_OR_MORE, Action, ArgumentError, ArgumentParser, _get_action_name, _SubParsersAction
  from gettext import gettext
  from typing import Dict, List, Set, Tuple
label_desc: Use image node_id 3 for calling a global function with example usage: action_is_greedy(action, isoptional) and returns: unknown, unknown, True