def tag_album(items, search_artist=None, search_album=None,
              search_ids=[]):
    # Get current metadata.
    likelies, consensus = current_metadata(items)
    cur_artist = likelies['artist']
    cur_album = likelies['album']
    log.debug(u'Tagging {0} - {1}', cur_artist, cur_album)

    # The output result (distance, AlbumInfo) tuples (keyed by MB album
    # ID).
    candidates = {}

    # Search by explicit ID.
    if search_ids:
        search_cands = []
        for search_id in search_ids:
            log.debug(u'Searching for album ID: {0}', search_id)
            search_cands.extend(hooks.albums_for_id(search_id))

    # Use existing metadata or text search.
    else:
        # Try search based on current ID.
        id_info = match_by_id(items)
        if id_info:
            _add_candidate(items, candidates, id_info)
            rec = _recommendation(candidates.values())
            log.debug(u'Album ID match recommendation is {0}', rec)
            if candidates and not config['import']['timid']:
                # If we have a very good MBID match, return immediately.
                # Otherwise, this match will compete against metadata-based
                # matches.
                if rec == Recommendation.strong:
                    log.debug(u'ID match.')
                    return cur_artist, cur_album, candidates.values(), rec

        # Search terms.
        if not (search_artist and search_album):
            # No explicit search terms -- use current metadata.
            search_artist, search_album = cur_artist, cur_album
        log.debug(u'Search terms: {0} - {1}', search_artist, search_album)

        # Is this album likely to be a "various artist" release?
        va_likely = ((not consensus['artist']) or
                     (search_artist.lower() in VA_ARTISTS) or
                     any(item.comp for item in items))
        log.debug(u'Album might be VA: {0}', va_likely)

        # Get the results from the data sources.
        search_cands = hooks.album_candidates(items, search_artist,
                                              search_album, va_likely)

    log.debug(u'Evaluating {0} candidates.', len(search_cands))
    for info in search_cands:
        _add_candidate(items, candidates, info)

    # Sort and get the recommendation.
    candidates = sorted(candidates.itervalues())
    rec = _recommendation(candidates)
    return cur_artist, cur_album, candidates, rec
An unknown verb raises NotImplementedError.
dataset/ETHPy150Open beetbox/beets/beets/autotag/match.py/tag_album--crossover with--dataset/ETHPy150Open ralphm/wokkel/wokkel/test/test_pubsub.py/PubSubRequestTest.test_fromElementUnknown