code: def default_project_options(**kw) -> typing.List[ProjectOption]:
      """Get default Project Options
  
      Attributes of any default option can be updated. Here is an example
      when attribute `optional` from `verbose` option needs to be updates:
  
          default_project_options(verbose={"optional": ["build"]})
  
      This will update the `optional` attribute of `verbose` ProjectOption
      to be `["build"]`.
  
      Returns
      -------
      options: List[ProjectOption]
          A list of default ProjectOption with modifications.
      """
      options = [
          ProjectOption(
              "verbose",
              optional=["generate_project"],
              type="bool",
              default=False,
              help="Run build with verbose output.",
          ),
          ProjectOption(
              "project_type",
              required=["generate_project"],
              type="str",
              help="Type of project to generate.",
          ),
          ProjectOption(
              "board",
              required=["generate_project"],
              type="str",
              help="Name of the board to build for.",
          ),
          ProjectOption(
              "cmsis_path",
              optional=["generate_project"],
              type="str",
              default=None,
              help="Path to the CMSIS directory.",
          ),
          ProjectOption(
              "warning_as_error",
              optional=["generate_project"],
              type="bool",
              default=False,
              help="Treat warnings as errors and raise an Exception.",
          ),
          ProjectOption(
              "compile_definitions",
              optional=["generate_project"],
              type="str",
              default=None,
              help="Extra definitions added project compile.",
          ),
          ProjectOption(
              "extra_files_tar",
              optional=["generate_project"],
              type="str",
              default=None,
              help="If given, during generate_project, "
              "uncompress the tarball at this path into the project dir.",
          ),
      ]
      for name, config in kw.items():
          option_found = False
          for ind, option in enumerate(options):
              if option.name == name:
                  options[ind] = option.replace(config)
                  option_found = True
                  break
          if not option_found:
              raise ValueError(
                  "Option {} was not found in default ProjectOptions.".format(
                      name
                  )
              )
  
      return options
  
imports: import abc
  import argparse
  import base64
  import collections
  import enum
  import io
  import json
  import logging
  import os
  import pathlib
  import re
  import select
  import sys
  import time
  import traceback
  import typing
label_desc: Use image node_id 4 for calling a global function with example usage: default_project_options() and returns: options