def get_playlist(target_playlist, playlists):
    """
    Searches for a playlist named `target_playlist` in the list `playlists`.

    :param target_playlist:
    :param playlists:
    :return:
    """
    for playlist in playlists:
        if playlist['name'] == target_playlist:
            return playlist