def get_monitors(account_name, monitor_names, debug=False):
 requested_mons = []
 account = get_account_by_name(account_name)
 account_manager = account_registry.get(account.account_type.name)()
 for monitor_name in monitor_names:
  watcher_class = watcher_registry[monitor_name]
  if account_manager.is_compatible_with_account_type(watcher_class.account_type):
   monitor = Monitor(watcher_class, account, debug)
   requested_mons.append(monitor)
 return requested_mons

def get_monitors ( account_name , monitor_names , debug = False ) : requested_mons = [ ] account = get_account_by_name ( account_name ) account_manager = account_registry . get ( account . account_type . name ) ( ) for monitor_name in monitor_names : watcher_class = watcher_registry [ monitor_name ] if account_manager . is_compatible_with_account_type ( watcher_class . account_type ) : monitor = Monitor ( watcher_class , account , debug ) requested_mons . append ( monitor ) return requested_mons
returns a list of monitors in the correct audit order which apply to one or more of the accounts .