

def main(program=None, args=None, stream=sys.stderr):
    'Collect and run healthchecks, output to stdout and stderr.'
    parser = cli_parser(program)
    arguments = parser.parse_args(args)
    if arguments.healthchecks:
        healthchecks = arguments.healthchecks
    else:
        healthchecks = HEALTHCHECKS
    verbosity = (2 if arguments.verbose else 1)
    app = HealthCheckProgram(discover=healthchecks, stream=stream, verbosity=verbosity)
    result = app()
    if result.wasSuccessful():
        sys.exit(0)
    else:
        sys.exit(1)

dataset/ETHPy150Open python-hospital/hospital/hospital/cli.py main/original