def _id_to_index(self, track_id):
        track_id = cast_arg(int, track_id)
        for index, track in enumerate(self.playlist):
            if self._item_id(track) == track_id:
                return index
        # Loop finished with no track found.
        raise ArgumentNotFoundError()
Searches the playlist for a song with the given id and
dataset/ETHPy150Open beetbox/beets/beetsplug/bpd/__init__.py/BaseServer._id_to_index