def _get_hls_streams(self, channel_id, wait_for_transcode=False):
        # HLS streams are created on demand, so we may have to wait
        # for a transcode to be started.
        attempts = wait_for_transcode and 10 or 1
        playlist_url = HLS_PLAYLIST_URL.format(channel_id)
        streams = {}
        while attempts and not streams:
            try:
                streams = HLSStream.parse_variant_playlist(self.session,
                                                           playlist_url,
                                                           nameprefix="mobile_")
            except __HOLE__:
                # Channel is probably offline
                break

            attempts -= 1
            sleep(3)

        return streams
dataset/ETHPy150Open chrippa/livestreamer/src/livestreamer/plugins/ustreamtv.py/UStreamTV._get_hls_streams