def METHOD_NAME(self, song, text):
    # First, try writing to the tags.
    if "lyrics" not in song and "unsyncedlyrics" in song:
        tag = "unsyncedlyrics"
    else:
        tag = "lyrics"
    song[tag] = text
    try:
        song.write()
    except AudioFileError as e:
        print_w(f"Couldn't write embedded lyrics ({e!r})")
        self._save_to_file(song, text)
    else:
        print_d(f"Wrote embedded lyrics into {song('~filename')}")
        app.librarian.emit('changed', [song])
        fn = song.lyric_filename
        if fn:
            self._delete_file(fn)