<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def select_one_playlist(playlists):
 """Display the playlists returned by search api or user playlist. :params playlists: API['result']['playlists'] or API['playlist'] :return: a Playlist object. """


        if len(playlists) == 1:
            select_i = 0
        else:
            table = PrettyTable(['Sequence', 'Name'])
            for i, playlist in enumerate(playlists, 1):
                table.add_row([i, playlist['name']])
            click.echo(table)

            select_i = click.prompt('Select one playlist', type=int, default=1)
            while select_i < 1 or select_i > len(playlists):
                select_i = click.prompt('Error Select! Select Again', type=int)

        playlist_id = playlists[select_i-1]['id']
        playlist_name = playlists[select_i-1]['name']
        playlist = Playlist(playlist_id, playlist_name)
        return playlist