in cloudformation/resource_tools.py [0:0]
def wait_for_channel_states(medialive, channel_id, states):
current_state = ''
while current_state not in states:
time.sleep(5)
current_state = medialive.describe_channel(ChannelId=channel_id)['State']
return current_state