def METHOD_NAME(self, action, data):
    # pylint: disable=unnecessary-direct-lambda-call
    def artists_fetched_cb(future):
        self._fetching_artists = False
        artists = future.result()  # ignore the potential exception
        if artists:
            for artist in artists:
                try:
                    artist_action = action.menu().addAction(artist.name)
                    # create a closure to bind variable artist
                    artist_action.triggered.connect(
                        (lambda x: lambda: self._app.browser.goto(model=x))(artist))
                except RuntimeError:
                    # action may have been deleted.
                    return
        data['artists'] = artists or []
        action.setData(data)
    # artists value has not been fetched
    if data['artists'] is None and self._fetching_artists is False:
        logger.debug('fetch song.artists for actions')
        song = data['song']
        self._fetching_artists = True
        task = run_fn(lambda: self._app.library.song_upgrade(song).artists)
        task.add_done_callback(artists_fetched_cb)