<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def view(ctx):
 """ Build and view docs. """


    report.info(ctx, "docs.view", f"viewing documentation")
    build_path = ctx.docs.directory / "build" / "html" / "index.html"
    build_path = pathname2url(build_path.as_posix())
    webbrowser.open(f"file:{build_path!s}")