def METHOD_NAME(genres):
    genres = set(genres)
    playlists = {}
    new_genres = set()
    for page in xrange(5):
        args = []
        for g in genres:
            args.append((g, page))
        try:
            pool = ThreadPool(PROCESSES)
            pfunc = parse_page
            for i, res in enumerate(pool.imap_unordered(pfunc, args)):
                genre, page, pl, found = res
                print("%d/%d" % (i + 1, len(args)))
                playlists.update(pl)
                new_genres |= found
                if not pl:
                    genres.remove(genre)
        except Exception as e:
            print(e)
            return playlists, []
        finally:
            pool.terminate()
            pool.join()
    return playlists, new_genres