def get_monitors_and_dependencies(account, monitor_names, debug=False):
 monitors = all_monitors(account, debug)
 monitor_names = _find_dependent_monitors(monitors, monitor_names)
 requested_mons = []
 for mon in monitors:
  if (mon.watcher.index in monitor_names):
   requested_mons.append(mon)
 return requested_mons

def get_monitors_and_dependencies ( account , monitor_names , debug = False ) : monitors = all_monitors ( account , debug ) monitor_names = _find_dependent_monitors ( monitors , monitor_names ) requested_mons = [ ] for mon in monitors : if ( mon . watcher . index in monitor_names ) : requested_mons . append ( mon ) return requested_mons
returns a list of monitors in the correct audit order which apply to one or more of the accounts plus any monitors with audit results dependent on the ones requested .