def METHOD_NAME(self, assignment, exchange, flags=None, retcode=0):
    cmd = [
        "release_assignment", assignment,
        "--course", "abc101",
        "--Exchange.root={}".format(exchange)
    ]
    if flags is not None:
        cmd.extend(flags)
    run_nbgrader(cmd, retcode=retcode)