def album_distance(items, album_info, mapping):
 from beets.autotag.hooks import Distance
 dist = Distance()
 for plugin in find_plugins():
  dist.update(plugin.album_distance(items, album_info, mapping))
 return dist

def album_distance ( items , album_info , mapping ) : from beets . autotag . hooks import Distance dist = Distance ( ) for plugin in find_plugins ( ) : dist . update ( plugin . album_distance ( items , album_info , mapping ) ) return dist
returns the album distance calculated by plugins .