class_docstr: Allows to run Nets, ExecutionSteps, Plans, Tasks and TaskGroups.
  A session can potentially run in multiple nodes concurrently.
  
  
  Example:
      from core import Net
      from caffe2.python.task import Task, TaskGroup, WorkspaceType
  
      net = Net('test1')
      net.Add([net.Const(1), net.Const(2)])
  
      net2 = net.Clone()
      step = core.execution_step('step1', [net2])
  
      with TaskGroup(WorkspaceType.GLOBAL) as init_tg:
          with Node('node1'):
              n1setup = net.Net('n1setup')
              n1msg = n1setup.Const('Hello from node 1.')
              Task(step=n1setup)
  
      with TaskGroup() as private_tg:
          with Node('node1'):
              n1 = net.Net('n1')
              n1.Print(n1msg, 0)
              Task(step=n1)
          with Node('node2'):
              n2 = net.Net('n2')
              n2.Print(n2.Const('Hello from node 2.'), 0)
              Task(step=n2)
  
      session = LocalSession()
      session.run(net)
      session.run(step)
      session.run(init_tg)
      session.run(private_tg)
  
  
  Global Workspace:
      At the beginning of the session, a global workspace is created and kept
      alive for the duration of the session.
  
  
  Private Workspace:
      Tasks can be run either directly on the global workspace, or they can
      instantiate a private child workspace that is released after each run.
  
  Blob visibility:
      Tasks running in different nodes in parallel will always run under
      different workspaces, so it must be assumed that they won't be able to
      access each other's blobs. Tasks running on the same node will follow
      Workspace hierarchy rules: tasks running on separate private workspaces
      will only be able to share blobs defined on a common parent Workspace.
code: def __exit__(self, ex_type, value, traceback):
      if ex_type is None:
          self.close()
  
imports: from caffe2.python import core, workspace
  from caffe2.python.task import Cluster, Task, TaskGroup, WorkspaceType
label_desc: Use image node_id 11 for calling the Session obj's underlying member method code with example usage: obj.__exit__(ex_type, value, traceback) without return types