def METHOD_NAME(log, outpath, item):
    art = get_art(log, item)
    outpath = bytestring_path(outpath)
    if not art:
        log.info('No album art present in {0}, skipping.', item)
        return
    # Add an extension to the filename.
    ext = mediafile.image_extension(art)
    if not ext:
        log.warning('Unknown image type in {0}.',
                    displayable_path(item.path))
        return
    outpath += bytestring_path('.' + ext)
    log.info('Extracting album art from: {0} to: {1}',
             item, displayable_path(outpath))
    with open(syspath(outpath), 'wb') as f:
        f.write(art)
    return outpath