<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create_optparser(progname=None):
 """ an OptionParser instance filled with options and groups appropriate for use with the distdiff command """

    from . import report

    parser = ArgumentParser(prog=progname)
    parser.add_argument("dist", nargs=2,
                        help="distributions to compare")

    add_general_optgroup(parser)
    add_distdiff_optgroup(parser)
    add_jardiff_optgroup(parser)
    add_classdiff_optgroup(parser)

    report.add_general_report_optgroup(parser)
    report.add_json_report_optgroup(parser)
    report.add_html_report_optgroup(parser)

    return parser