'Create a new playlist.
If ``uri_scheme`` matches an URI scheme handled by a current backend,
that backend is asked to create the playlist. If ``uri_scheme`` is
:class:`None` or doesn\'t match a current backend, the first backend is
asked to create the playlist.
All new playlists must be created by calling this method, and **not**
by creating new instances of :class:`mopidy.models.Playlist`.
:param name: name of the new playlist
:type name: string
:param uri_scheme: use the backend matching the URI scheme
:type uri_scheme: string
:rtype: :class:`mopidy.models.Playlist` or :class:`None`'

def create(self, name, uri_scheme=None):

    if (uri_scheme in self.backends.with_playlists):
        backends = [self.backends.with_playlists[uri_scheme]]
    else:
        backends = self.backends.with_playlists.values()
    for backend in backends:
        with _backend_error_handling(backend):
            result = backend.playlists.create(name).get()
            if (result is None):
                continue
            validation.check_instance(result, Playlist)
            listener.CoreListener.send(u'playlist_changed', playlist=result)
            return result
    return None
