code: def parser_add_common_options(parser, version=None):
      """Add all options defined in common_args, but excludes 'help'"""
      # populate with standard options
      for arg in common_args:
          if arg == "help":
              continue
          parser_add_common_opt(parser, arg)
      # special case version arg
      if version is not None:
          import warnings
  
          warnings.warn(
              "Passing 'version' to parser_add_common_options "
              "no longer has an effect "
              "and will be removed in a future release.",
              DeprecationWarning,
          )
      parser_add_version_opt(
          parser, "datalad", include_name=True, delay=True
      )
  
imports: import argparse
  import logging
  import sys
  from collections import defaultdict
  from functools import partial
  from datalad import __version__
  from datalad.interface.base import get_cmd_doc, get_interface_groups, is_api_arg, load_interface
  from datalad.support.constraints import EnsureChoice
  from datalad.utils import getargspec
  from .common_args import common_args
  from .exec import call_from_parser
  from .helpers import get_commands_from_groups
  from .interface import alter_interface_docs_for_cmdline, get_cmd_ex, get_cmdline_command_name
label_desc: Use image node_id 10 for calling a global function with example usage: parser_add_common_options(parser, version) without return types