class_docstr: PerspectiveManager is an orchestrator for running Perspective on the
  server side.
  
  The core functionality resides in `process()`, which receives
  JSON-serialized messages from a client (implemented by `perspective-viewer`
  in the browser), executes the commands in the message, and returns the
  results of those commands back to the `post_callback`. Table instances
  should be passed to the manager using `host_table` - this allows server
  code to call Table APIs natively instead of proxying them through the
  Manager. Because Perspective is designed to be used in a shared context,
  i.e. multiple clients all accessing the same `Table`, PerspectiveManager
  comes with the context of `sessions` - an encapsulation of the actions
  and resources used by a single connection to Perspective, which can be
  cleaned up after the connection is closed.
  
  - When a client connects, for example through a websocket, a new session
      should be spawned using `new_session()`.
  - When the websocket closes, call `close()` on the session instance to
      clean up associated resources.
class_docstr_tok: ["PerspectiveManager","is","an","orchestrator","for","running","Perspective","on","the","server","side",".","The","core","functionality","resides","in","`","process","(",")","`",",","which","receives","JSON-serialized","messages","from","a","client","(","implemented","by","`","perspective-viewer","`","in","the","browser",")",",","executes","the","commands","in","the","message",",","and","returns","the","results","of","those","commands","back","to","the","`","post_callback","`",".","Table","instances","should","be","passed","to","the","manager","using","`","host_table","`","-","this","allows","server","code","to","call","Table","APIs","natively","instead","of","proxying","them","through","the","Manager",".","Because","Perspective","is","designed","to","be","used","in","a","shared","context",",","i.e",".","multiple","clients","all","accessing","the","same","`","Table","`",",","PerspectiveManager","comes","with","the","context","of","`","sessions","`","-","an","encapsulation","of","the","actions","and","resources","used","by","a","single","connection","to","Perspective",",","which","can","be","cleaned","up","after","the","connection","is","closed",".","-","When","a","client","connects",",","for","example","through","a","websocket",",","a","new","session","should","be","spawned","using","`","new_session","(",")","`",".","-","When","the","websocket","closes",",","call","`","close","(",")","`","on","the","session","instance","to","clean","up","associated","resources","."]
docstr: Block messages that can mutate the state of :obj:`~perspective.Table`
  objects under management.
  
  All ``PerspectiveManager`` objects exposed over the internet should be
  locked to prevent content from being mutated by clients.
docstr_tok: ["Block","messages","that","can","mutate","the","state","of",":","obj",":","`","~perspective.Table","`","objects","under","management",".","All","``","PerspectiveManager","``","objects","exposed","over","the","internet","should","be","locked","to","prevent","content","from","being","mutated","by","clients","."]
code: def lock(self):
      """Block messages that can mutate the state of :obj:`~perspective.Table`
      objects under management.
  
      All ``PerspectiveManager`` objects exposed over the internet should be
      locked to prevent content from being mutated by clients.
      """
      self._lock = True
  
file_path: perspective/python/perspective/perspective/manager/manager.py
imports: import random
  import string
  from functools import partial
  from ..core.exception import PerspectiveError
  from ..table import Table
  from .manager_internal import _PerspectiveManagerInternal
  from .session import PerspectiveSession
label_desc: Use image node_id 2 for calling the PerspectiveManager obj's underlying member method code with example usage: obj.lock() without return types