class_docstr: Context that gathers tasks which will run concurrently, potentially on
  multiple nodes. All tasks in the same node will share the same workspace
  and thus can share blobs, while tasks running in different nodes won't
  be able to directly share data.
  
  All tasks of the task group will start concurrently, and the task group
  will finish execution when the last task of the group finishes.
  
  Example:
      # suppose that s1 ... s5 are execution steps or nets.
      with TaskGroup() as tg:
          # these tasks go to default node 'local'
          Task(step=s1)
          Task(step=s2)
  
          with Node('n2'):
              Task(step=s3)
          with Node('n1'):
              Task(step=s4)
          with Node('n2'):
              Task(step=s5)
  
      # this will run all steps in parallel.
      # s1 and s2 will run at default node 'local'
      # s3 and s5 will run at node 'n2'
      # s4 will run at node 'n1'
      session.run(tg)
class_docstr_tok: ["Context","that","gathers","tasks","which","will","run","concurrently",",","potentially","on","multiple","nodes",".","All","tasks","in","the","same","node","will","share","the","same","workspace","and","thus","can","share","blobs",",","while","tasks","running","in","different","nodes","won't","be","able","to","directly","share","data",".","All","tasks","of","the","task","group","will","start","concurrently",",","and","the","task","group","will","finish","execution","when","the","last","task","of","the","group","finishes",".","Example",":","#","suppose","that","s1","...","s5","are","execution","steps","or","nets",".","with","TaskGroup","(",")","as","tg",":","#","these","tasks","go","to","default","node","'local'","Task","(","step=s1",")","Task","(","step=s2",")","with","Node","(","'n2","'",")",":","Task","(","step=s3",")","with","Node","(","'n1","'",")",":","Task","(","step=s4",")","with","Node","(","'n2","'",")",":","Task","(","step=s5",")","#","this","will","run","all","steps","in","parallel",".","#","s1","and","s2","will","run","at","default","node","'local'","#","s3","and","s5","will","run","at","node","'n2'","#","s4","will","run","at","node","'n1'","session.run","(","tg",")"]
code: def num_registered_tasks(self):
      return len(self._tasks_to_add) + len(self._tasks)
  
imports: from caffe2.python import core, context
  from caffe2.python.schema import Field, from_blob_list
  from collections import defaultdict
  from copy import copy
label_desc: Use image node_id 6 for calling the TaskGroup obj's underlying member method code with example usage: obj.num_registered_tasks() and returns: unknown