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')
  
      filter_file = cls._ParseStringOption(options, 'file_filter')
  
      # Search the data location for the filter file.
      if filter_file and not os.path.isfile(filter_file):
        data_location = getattr(configuration_object, '_data_location', None)
        if data_location:
          filter_file_basename = os.path.basename(filter_file)
          filter_file_path = os.path.join(data_location, filter_file_basename)
          if os.path.isfile(filter_file_path):
            filter_file = filter_file_path
  
      if filter_file and not os.path.isfile(filter_file):
        raise errors.BadConfigOption(
            'No such collection filter file: {0:s}.'.format(filter_file))
  
      setattr(configuration_object, '_filter_file', filter_file)
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 collection file does not exist.