code: def ParseOptions(cls, options, configuration_object):
      
      if not isinstance(configuration_object, tools.CLITool):
        raise errors.BadConfigObject(
            'Configuration object is not an instance of CLITool')
  
      number_of_extraction_workers = cls._ParseNumericOption(
          options, 'workers', default_value=0)
  
      if number_of_extraction_workers < 0:
        raise errors.BadConfigOption(
            'Invalid number of extraction workers value cannot be negative.')
  
      worker_memory_limit = cls._ParseNumericOption(
          options, 'worker_memory_limit')
  
      if worker_memory_limit and worker_memory_limit < 0:
        raise errors.BadConfigOption(
            'Invalid worker memory limit value cannot be negative.')
  
      setattr(
          configuration_object, '_number_of_extraction_workers',
          number_of_extraction_workers)
      setattr(configuration_object, '_worker_memory_limit', worker_memory_limit)
docs: Parses and validates options.
  
      Args:
        options (argparse.Namespace): parser options.
        configuration_object (CLITool): object to be configured by the argument
            helper.
  
      Raises:
        BadConfigObject: when the configuration object is of the wrong type.
        BadConfigOption: when a configuration parameter fails validation.