'The track that will be played if calling
:meth:`mopidy.core.PlaybackController.next()`.
For normal playback this is the next track in the tracklist. If repeat
is enabled the next track can loop around the tracklist. When random is
enabled this should be a random track, all tracks should be played once
before the tracklist repeats.
:param tl_track: the reference track
:type tl_track: :class:`mopidy.models.TlTrack` or :class:`None`
:rtype: :class:`mopidy.models.TlTrack` or :class:`None`'

def next_track(self, tl_track):

    deprecation.warn(u'core.tracklist.next_track', pending=True)
    ((tl_track is None) or validation.check_instance(tl_track, TlTrack))
    if (not self._tl_tracks):
        return None
    if (self.get_random() and (not self._shuffled)):
        if (self.get_repeat() or (not tl_track)):
            logger.debug(u'Shuffling    tracks')
            self._shuffled = self._tl_tracks[:]
            random.shuffle(self._shuffled)
    if self.get_random():
        if self._shuffled:
            return self._shuffled[0]
        return None
    next_index = self.index(tl_track)
    if (next_index is None):
        next_index = 0
    else:
        next_index += 1
    if self.get_repeat():
        if (self.get_consume() and (len(self._tl_tracks) == 1)):
            return None
        else:
            next_index %= len(self._tl_tracks)
    elif (next_index >= len(self._tl_tracks)):
        return None
    return self._tl_tracks[next_index]
