def _yield_clusters(max_days_ago=None, now=None, **runner_kwargs):
 if (now is None):
  now = datetime.utcnow()
 emr_conn = EMRJobRunner(**runner_kwargs).make_emr_conn()
 created_after = None
 if (max_days_ago is not None):
  created_after = (now - timedelta(days=max_days_ago))
 for cluster_summary in _yield_all_clusters(emr_conn, created_after=created_after, _delay=_DELAY):
  cluster_id = cluster_summary.id
  sleep(_DELAY)
  cluster = _patched_describe_cluster(emr_conn, cluster_id)
  cluster.steps = _list_all_steps(emr_conn, cluster_id, _delay=_DELAY)
  cluster.bootstrapactions = list(_yield_all_bootstrap_actions(emr_conn, cluster_id, _delay=_DELAY))
  (yield cluster)

def _yield_clusters ( max_days_ago = None , now = None , ** runner_kwargs ) : if ( now is None ) : now = datetime . utcnow ( ) emr_conn = EMRJobRunner ( ** runner_kwargs ) . make_emr_conn ( ) created_after = None if ( max_days_ago is not None ) : created_after = ( now - timedelta ( days = max_days_ago ) ) for cluster_summary in _yield_all_clusters ( emr_conn , created_after = created_after , _delay = _DELAY ) : cluster_id = cluster_summary . id sleep ( _DELAY ) cluster = _patched_describe_cluster ( emr_conn , cluster_id ) cluster . steps = _list_all_steps ( emr_conn , cluster_id , _delay = _DELAY ) cluster . bootstrapactions = list ( _yield_all_bootstrap_actions ( emr_conn , cluster_id , _delay = _DELAY ) ) ( yield cluster )
get relevant cluster information from emr .