'The position of the given track in the tracklist.
If neither *tl_track* or *tlid* is given we return the index of
the currently playing track.
:param tl_track: the track to find the index of
:type tl_track: :class:`mopidy.models.TlTrack` or :class:`None`
:param tlid: TLID of the track to find the index of
:type tlid: :class:`int` or :class:`None`
:rtype: :class:`int` or :class:`None`
.. versionadded:: 1.1
The *tlid* parameter'

def index(self, tl_track=None, tlid=None):

    ((tl_track is None) or validation.check_instance(tl_track, TlTrack))
    ((tlid is None) or validation.check_integer(tlid, min=1))
    if ((tl_track is None) and (tlid is None)):
        tl_track = self.core.playback.get_current_tl_track()
    if (tl_track is not None):
        try:
            return self._tl_tracks.index(tl_track)
        except ValueError:
            pass
    elif (tlid is not None):
        for (i, tl_track) in enumerate(self._tl_tracks):
            if (tl_track.tlid == tlid):
                return i
    return None
