def parse_playlist_uri(uri):
    """
    Takes a playlist uri and splits it to (user_id, playlist_id)
    """
    playlistparts = uri.split(':')
    # Sample: spotify:user:lmljoe:playlist:0DXoY83tBvgWkd8QH49yAI
    if len(playlistparts) != 5:
        print('Invalid playlist id')
        exit()
    user_id = playlistparts[2]
    playlist_id = playlistparts[4]
    return user_id, playlist_id