code: def main(argv=None):
      
      arguments = cli_common(__doc__, argv=argv)
      report = ReportNode(arguments['CAMPAIGN-DIR'])
      jobs = wait_for_completion(report, float(arguments['--interval']))
      status = ReportStatus(report, jobs)
      if not arguments['--silent']:
          fmt = arguments['--format'] or 'log'
          status.log(fmt)
      if argv is None:
          sys.exit(0 if status.succeeded else 1)
      return status.status
docs: ben-wait entry point