def _yield_all_instances(emr_conn, cluster_id, *args, **kwargs):
 for resp in _repeat(emr_conn.list_instances, cluster_id, *args, **kwargs):
  for instance in getattr(resp, 'instances', []):
   (yield instance)

def _yield_all_instances ( emr_conn , cluster_id , * args , ** kwargs ) : for resp in _repeat ( emr_conn . list_instances , cluster_id , * args , ** kwargs ) : for instance in getattr ( resp , 'instances' , [ ] ) : ( yield instance )
get information about all instances for the given cluster .