code: def AddArguments(cls, argument_group):
      
      argument_group.add_argument(
          '-o', '--output_format', '--output-format', metavar='FORMAT',
          dest='output_format', default='dynamic', help=(
              'The output format. Use "-o list" to see a list of available '
              'output formats.'))
  
      argument_group.add_argument(
          '-w', '--write', metavar='OUTPUT_FILE', dest='write',
          help='Output filename.')
  
      # TODO: determine if this is repeated elsewhere and refactor this into
      # a helper function.
      arguments = sys.argv[1:]
      argument_index = 0
  
      if '-o' in arguments:
        argument_index = arguments.index('-o') + 1
      elif '--output_format' in arguments:
        argument_index = arguments.index('--output_format') + 1
      elif '--output-format' in arguments:
        argument_index = arguments.index('--output-format') + 1
  
      if 0 < argument_index < len(arguments):
        names = [name.strip() for name in arguments[argument_index].split(',')]
      else:
        names = ['dynamic']
  
      if names and names != ['list']:
        manager.ArgumentHelperManager.AddCommandLineArguments(
            argument_group, category='output', names=names)
docs: Adds command line arguments to an argument group.
  
      This function takes an argument parser or an argument group object and adds
      to it all the command line arguments this helper supports.
  
      Args:
        argument_group (argparse._ArgumentGroup|argparse.ArgumentParser):
            argparse group.