class_docstr: A Task is composed of an execution step and zero or more outputs.
  Tasks are executed in the context of a TaskGroup, which, in turn, can
  be run by a Session.
  
  Task outputs are fetched by the session at the end of the run.
  
  The recommended way of creating a task is by using `net_builder.ops`.
  Example:
  
      from net_builder import ops
      with Node('trainer'), Task(name='my_task', num_instances=2):
          with ops.task_init():
              globl = ops.Const(0)
          with ops.task_instance_init():
              local = ops.Const(0)
          with ops.loop(100):
              ops.Copy(globl, local)
          with ops.task_instance_exit():
              ops.Add([globl, local], [globl])
          with ops.task_exit():
              ops.Mul([globl, globl], [globl])
  
  The task above will create 2 instances that will run in parallel.
  Each instance will copy `local` to `globl` 100 times, Then Add `local`
  to `globl` once. The `Mul` will only execute once, after all the instances
  of the task have finished.
class_docstr_tok: ["A","Task","is","composed","of","an","execution","step","and","zero","or","more","outputs",".","Tasks","are","executed","in","the","context","of","a","TaskGroup",",","which",",","in","turn",",","can","be","run","by","a","Session",".","Task","outputs","are","fetched","by","the","session","at","the","end","of","the","run",".","The","recommended","way","of","creating","a","task","is","by","using","`","net_builder.ops","`",".","Example",":","from","net_builder","import","ops","with","Node","(","'trainer","'",")",",","Task","(","name='my_task","'",",","num_instances=2",")",":","with","ops.task_init","(",")",":","globl","=","ops.Const","(","0",")","with","ops.task_instance_init","(",")",":","local","=","ops.Const","(","0",")","with","ops.loop","(","100",")",":","ops.Copy","(","globl",",","local",")","with","ops.task_instance_exit","(",")",":","ops.Add","(","[","globl",",","local","]",",","[","globl","]",")","with","ops.task_exit","(",")",":","ops.Mul","(","[","globl",",","globl","]",",","[","globl","]",")","The","task","above","will","create","2","instances","that","will","run","in","parallel",".","Each","instance","will","copy","`","local","`","to","`","globl","`","100","times",",","Then","Add","`","local","`","to","`","globl","`","once",".","The","`","Mul","`","will","only","execute","once",",","after","all","the","instances","of","the","task","have","finished","."]
code: def _notify_used(self):
      self.get_step()
      self._already_used = True
  
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 13 for calling the Task obj's underlying member method code with example usage: obj._notify_used() without return types