code: def ParseOptions(cls, options, output_module):  # pylint: disable=arguments-differ
      
      if not isinstance(output_module, dynamic.DynamicOutputModule):
        raise errors.BadConfigObject(
            'Output module is not an instance of DynamicOutputModule')
  
      default_fields = ','.join(cls._DEFAULT_FIELDS)
      fields = cls._ParseStringOption(
          options, 'fields', default_value=default_fields)
  
      additional_fields = cls._ParseStringOption(
          options, 'additional_fields')
  
      if additional_fields:
        fields = '{0:s},{1:s}'.format(fields, additional_fields)
  
      output_module.SetFields([
          field_name.strip() for field_name in fields.split(',')])
docs: Parses and validates options.
  
      Args:
        options (argparse.Namespace): parser options.
        output_module (OutputModule): output module to configure.
  
      Raises:
        BadConfigObject: when the output module object is of the wrong type.
        BadConfigOption: when the output filename was not provided.