<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def main(argv=None):
 """ben-wait entry point"""

    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