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')
  
      artifact_filters = cls._ParseStringOption(options, 'artifact_filter_string')
      artifact_filters_file = cls._ParseStringOption(
          options, 'artifact_filters_file')
      filter_file = cls._ParseStringOption(options, 'file_filter')
  
      if artifact_filters and artifact_filters_file:
        raise errors.BadConfigOption(
            'Please only specify artifact definition names in a file '
            'or on the command line.')
  
      if (artifact_filters_file or artifact_filters) and filter_file:
        raise errors.BadConfigOption(
            'Please do not specify both artifact definitions and legacy filters.')
  
      if artifact_filters_file and os.path.isfile(artifact_filters_file):
        with open(artifact_filters_file) as file_object:
          file_content = file_object.read()
          artifact_filters = file_content.splitlines()
      elif artifact_filters:
        artifact_filters = [name.strip() for name in artifact_filters.split(',')]
  
      setattr(configuration_object, '_artifact_filters', artifact_filters)
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: if the required artifact definitions are not defined.