<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def summary(args):
 """ %prog summary blastfile Provide summary on id% and cov%, for both query and reference. Often used in comparing genomes (based on NUCMER results). """

    p = OptionParser(summary.__doc__)
    p.add_option("--strict", default=False, action="store_true",
                help="Strict 'gapless' mode. Exclude gaps from covered base.")
    p.add_option("--tabular", default=False, action="store_true",
                help="Print succint tabular output")

    opts, args = p.parse_args(args)

    if len(args) != 1:
        sys.exit(not p.print_help())

    blastfile, = args

    alignstats = get_stats(blastfile, strict=opts.strict)
    if opts.tabular:
        print(str(alignstats))
    else:
        alignstats.print_stats()