class_docstr: WSGI server for notebook environments.
class_docstr_tok: ["WSGI","server","for","notebook","environments","."]
docstr: Returns the current port or error if the server is not started.
  
  Raises:
    RuntimeError: If server has not been started yet.
  Returns:
    The port being used by the server.
docstr_tok: ["Returns","the","current","port","or","error","if","the","server","is","not","started",".","Raises",":","RuntimeError",":","If","server","has","not","been","started","yet",".","Returns",":","The","port","being","used","by","the","server","."]
code: def port(self):
      """Returns the current port or error if the server is not started.
  
      Raises:
        RuntimeError: If server has not been started yet.
      Returns:
        The port being used by the server.
      """
      if self._server_thread is None:
          raise RuntimeError("Server not started.")
      return self._port
  
imports: import socket
  import threading
  from typing import Optional
  from wsgiref import validate
  import wsgiref.simple_server
  from absl import logging
  import portpicker
  import termcolor
  from werkzeug import serving
label_desc: Use image node_id 3 for calling the NotebookWsgiServer obj's underlying member method code with example usage: obj.port() and returns: self