def METHOD_NAME(clean=True, vb=0, timeout=0, dry_run=False, nprocs=1, **kwargs):
    """Run sphinx-build to create HTML."""
    build_dir = "build"
    output_file = "sphinx-errors.txt"
    if not dry_run:
        if clean:
            if os.path.exists(build_dir):
                print_status(f"Remove build dir '{build_dir}'")
                shutil.rmtree(build_dir)
        if os.path.exists(output_file):
            os.unlink(output_file)
    args = ["sphinx-build", "-M", "html", ".", build_dir, "-w", output_file]
    # run
    verbosity = "-q" if vb <= 0 else "-" + "v" * vb
    args.append(verbosity)
    if nprocs <= 0:
        args.append("-j auto")
    elif nprocs > 1:
        args.append(f"-j {nprocs}")
    # if nprocs == 1, do not specify "-j" args and fall back to sphinx-build's default
    print_status(f"Run: {' '.join(args)}")
    _run("html", args, timeout, dry_run)
    if dry_run:
        return
    # check output file
    print_status("Check output file")
    num_lines = num_warnings = num_errors = 0
    if os.path.exists(output_file):
        # Count lines, warnings and errors
        with open(output_file) as outf:
            for line in outf:
                num_lines += 1
                num_warnings = num_warnings + 1 if "WARNING: " in line else num_warnings
                num_errors = num_errors + 1 if "ERROR: " in line else num_errors
    if num_lines > 0:
        raise CommandError(
            "html",
            f"sphinx-build had {num_warnings} warnings, {num_errors} errors in {num_lines} lines of output\n"
            f"These will cause tests to fail\n"
            f"See file '{output_file}' for details",
        )