def METHOD_NAME():
    """Main function. Parses args, reads the log files and renders them as text or html."""
    parser = argparse.ArgumentParser(
        description=__doc__, formatter_class=argparse.RawTextHelpFormatter)
    parser.add_argument(
        'testdir', nargs='?', default='',
        help=('temporary test directory to combine logs from. '
              'Defaults to the most recent'))
    parser.add_argument('-c', '--color', dest='color', action='store_true', help='outputs the combined log with events colored by source (requires posix terminal colors. Use less -r for viewing)')
    parser.add_argument('--html', dest='html', action='store_true', help='outputs the combined log as html. Requires jinja2. pip install jinja2')
    args = parser.parse_args()
    if args.html and args.color:
        print("Only one out of --color or --html should be specified")
        sys.exit(1)
    testdir = args.testdir or find_latest_test_dir()
    if not testdir:
        print("No test directories found")
        sys.exit(1)
    if not args.testdir:
        print("Opening latest test directory: {}".format(testdir), file=sys.stderr)
    log_events = read_logs(testdir)
    print_logs(log_events, color=args.color, html=args.html)