'Set values in `tags` to `None` if the field is in
`self.fields_to_progs` and any of the corresponding `progs` matches the
field value.
Also update the `item` itself if `update_database` is set in the
config.'

def set_fields(self, item, tags):

    fields_set = False
    if (not self.fields_to_progs):
        self._log.warning(u'no    fields,    nothing    to    do')
        return False
    for (field, progs) in self.fields_to_progs.items():
        if (field in tags):
            value = tags[field]
            match = _match_progs(tags[field], progs)
        else:
            value = ''
            match = (not progs)
        if match:
            fields_set = True
            self._log.debug(u'{0}:    {1}    ->    None', field, value)
            tags[field] = None
            if self.config['update_database']:
                item[field] = None
    return fields_set
