def artist_to_ref(artist):
    """Convert a mopidy artist to a mopidy ref."""
    if artist.name:
        name = artist.name
    else:
        name = 'Unknown artist'
    return Ref.directory(uri=artist.uri, name=name)