def _find_dependent_monitors(monitors, monitor_names):
 last_iteration_count = 0
 while (len(monitor_names) != last_iteration_count):
  last_iteration_count = len(monitor_names)
  for mon in monitors:
   for auditor in mon.auditors:
    for support_index in auditor.support_auditor_indexes:
     if ((support_index in monitor_names) and (mon.watcher.index not in monitor_names)):
      monitor_names.append(mon.watcher.index)
    for support_index in auditor.support_watcher_indexes:
     if ((support_index in monitor_names) and (mon.watcher.index not in monitor_names)):
      monitor_names.append(mon.watcher.index)
 return monitor_names

def _find_dependent_monitors ( monitors , monitor_names ) : last_iteration_count = 0 while ( len ( monitor_names ) != last_iteration_count ) : last_iteration_count = len ( monitor_names ) for mon in monitors : for auditor in mon . auditors : for support_index in auditor . support_auditor_indexes : if ( ( support_index in monitor_names ) and ( mon . watcher . index not in monitor_names ) ) : monitor_names . append ( mon . watcher . index ) for support_index in auditor . support_watcher_indexes : if ( ( support_index in monitor_names ) and ( mon . watcher . index not in monitor_names ) ) : monitor_names . append ( mon . watcher . index ) return monitor_names
used to find all the monitors that re dependent on those in the original monitor_names to the list .