code: def start_notebook(args: Namespace) -> None:
      config = ntsc.parse_config(
          args.config_file, None, args.config, args.volume
      )
  
      files = context.read_v1_context(args.context, args.include)
  
      workspace_id = cli.workspace.get_workspace_id_from_args(args)
  
      body = bindings.v1LaunchNotebookRequest(
          config=config,
          files=files,
          preview=args.preview,
          templateName=args.template,
          workspaceId=workspace_id,
      )
      resp = bindings.post_LaunchNotebook(
          cli.setup_session(args), body=body
      )
  
      if args.preview:
          print(render.format_object_as_yaml(resp.config))
          return
  
      nb = resp.notebook
  
      if args.detach:
          print(nb.id)
          return
  
      render.report_job_launched("notebook", resp.notebook.id)
  
      if resp.warnings:
          cli.print_launch_warnings(resp.warnings)
      currentSlotsExceeded = (resp.warnings is not None) and (
          bindings.v1LaunchWarning.CURRENT_SLOTS_EXCEEDED
          in resp.warnings
      )
  
      cli.wait_ntsc_ready(
          cli.setup_session(args), api.NTSC_Kind.notebook, nb.id
      )
  
      assert (
          nb.serviceAddress is not None
      ), "missing tensorboard serviceAddress"
      nb_path = request.make_interactive_task_url(
          task_id=nb.id,
          service_address=nb.serviceAddress,
          description=nb.description,
          resource_pool=nb.resourcePool,
          task_type="jupyter-lab",
          currentSlotsExceeded=currentSlotsExceeded,
      )
      url = api.make_url(args.master, nb_path)
      if not args.no_browser:
          api.browser_open(args.master, nb_path)
      print(
          colored(
              "Jupyter Notebook is running at: {}".format(url), "green"
          )
      )
  
file_path: determined/harness/determined/cli/notebook.py
imports: from argparse import ONE_OR_MORE, FileType, Namespace
  from functools import partial
  from pathlib import Path
  from typing import cast
  from termcolor import colored
  from determined import cli
  from determined.cli import ntsc, render, task
  from determined.common import api, context
  from determined.common.api import authentication, bindings, request
  from determined.common.check import check_none
  from determined.common.declarative_argparse import Arg, ArgsDescription, Cmd, Group
label_desc: Use image node_id 1 for calling a global function with example usage: start_notebook(args) without return types