def METHOD_NAME(self, lib, query, move, pretend, write):
    """Retrieve and apply info from the autotagger for items matched by
    query.
    """
    for item in lib.items(query + ['singleton:true']):
        if not item.mb_trackid:
            self._log.info(
                'Skipping singleton with no mb_trackid: {}', item
            )
            continue
        if not self.is_beatport_track(item):
            self._log.info(
                'Skipping non-{} singleton: {}',
                self.beatport_plugin.data_source,
                item,
            )
            continue
        # Apply.
        trackinfo = self.beatport_plugin.track_for_id(item.mb_trackid)
        with lib.transaction():
            autotag.apply_item_metadata(item, trackinfo)
            apply_item_changes(lib, item, move, pretend, write)