def all_monitors(account_name, debug=False):
 monitor_dict = {}
 account = get_account_by_name(account_name)
 account_manager = account_registry.get(account.account_type.name)()
 for watcher_class in watcher_registry.itervalues():
  if account_manager.is_compatible_with_account_type(watcher_class.account_type):
   monitor = Monitor(watcher_class, account, debug)
   monitor_dict[monitor.watcher.index] = monitor
 for mon in monitor_dict.values():
  if (len(mon.auditors) > 0):
   path = [mon.watcher.index]
   _set_dependency_hierarchies(monitor_dict, mon, path, (mon.audit_tier + 1))
 monitors = sorted(monitor_dict.values(), key=(lambda item: item.audit_tier), reverse=True)
 return monitors

def all_monitors ( account_name , debug = False ) : monitor_dict = { } account = get_account_by_name ( account_name ) account_manager = account_registry . get ( account . account_type . name ) ( ) for watcher_class in watcher_registry . itervalues ( ) : if account_manager . is_compatible_with_account_type ( watcher_class . account_type ) : monitor = Monitor ( watcher_class , account , debug ) monitor_dict [ monitor . watcher . index ] = monitor for mon in monitor_dict . values ( ) : if ( len ( mon . auditors ) > 0 ) : path = [ mon . watcher . index ] _set_dependency_hierarchies ( monitor_dict , mon , path , ( mon . audit_tier + 1 ) ) monitors = sorted ( monitor_dict . values ( ) , key = ( lambda item : item . audit_tier ) , reverse = True ) return monitors
returns a list of all monitors in the correct audit order which apply to one or more of the accounts .