code: def insert_weave_option_group(parser):
      
      optimization_group = parser.add_argument_group("Options for controlling "
                                     "weave")
  
      optimization_group.add_argument("--per-process-weave-cache",
                      action="store_true",
                      default=False,
                      help="""If given, each process will use a separate directory
                           for weave compilation.  This is slower, but safer if
                           several instances may be starting on the same machine at
                           the same time.""")
  
      optimization_group.add_argument("--clear-weave-cache-at-start",
                      action="store_true",
                      default=False,
                      help="If given, delete the contents of the weave cache "
                           "when the process starts")
  
      optimization_group.add_argument("--clear-weave-cache-at-end",
                      action="store_true",
                      default=False,
                      help="If given, delete the contents of the weave cache "
                           "when the process exits")
  
      optimization_group.add_argument("--fixed-weave-cache",
                      action="store_true",
                      default=False,
                      help="If given, use fixed directory PWD/pycbc_inspiral for "
                           " the weave cache")
docs: Adds the options used to specify weave options.
  
      Parameters
      ----------
      parser : object
          OptionParser instance