class_docstr: Base class for all DataFlow 
docstr: * The caller must guarantee that :meth:`reset_state` should be called **once and only once**
    by the **process that uses the dataflow** before :meth:`__iter__` is called.
    The caller thread of this method should stay alive to keep this dataflow alive.
  
  * It is meant for certain initialization that involves processes,
    e.g., initialize random number generators (RNG), create worker processes.
  
    Because it's very common to use RNG in data processing,
    developers of dataflow can also subclass :class:`RNGDataFlow` to have easier access to
    a properly-initialized RNG.
  
  * A dataflow is not fork-safe after :meth:`reset_state` is called (because this will violate the guarantee).
    There are a few other dataflows that are not fork-safe anytime, which will be mentioned in the docs.
  
  * You should take the responsibility and follow the above guarantee if you're the caller of a dataflow yourself
    (either when you're using dataflow outside of tensorpack, or if you're writing a wrapper dataflow).
  
  * Tensorpack's built-in forking dataflows (:class:`MultiProcessRunner`, :class:`MultiProcessMapData`, etc)
    and other component that uses dataflows (:class:`InputSource`)
    already take care of the responsibility of calling this method.
docstr_tok: ["*","The","caller","must","guarantee","that",":","meth",":","`","reset_state","`","should","be","called","*","*","once","and","only","once","*","*","by","the","*","*","process","that","uses","the","dataflow","*","*","before",":","meth",":","`","__iter__","`","is","called",".","The","caller","thread","of","this","method","should","stay","alive","to","keep","this","dataflow","alive",".","*","It","is","meant","for","certain","initialization","that","involves","processes",",","e.g.",",","initialize","random","number","generators","(","RNG",")",",","create","worker","processes",".","Because","it","'s","very","common","to","use","RNG","in","data","processing",",","developers","of","dataflow","can","also","subclass",":","class",":","`","RNGDataFlow","`","to","have","easier","access","to","a","properly-initialized","RNG",".","*","A","dataflow","is","not","fork-safe","after",":","meth",":","`","reset_state","`","is","called","(","because","this","will","violate","the","guarantee",")",".","There","are","a","few","other","dataflows","that","are","not","fork-safe","anytime",",","which","will","be","mentioned","in","the","docs",".","*","You","should","take","the","responsibility","and","follow","the","above","guarantee","if","you","'re","the","caller","of","a","dataflow","yourself","(","either","when","you","'re","using","dataflow","outside","of","tensorpack",",","or","if","you","'re","writing","a","wrapper","dataflow",")",".","*","Tensorpack","'s","built-in","forking","dataflows","(",":","class",":","`","MultiProcessRunner","`",",",":","class",":","`","MultiProcessMapData","`",",","etc",")","and","other","component","that","uses","dataflows","(",":","class",":","`","InputSource","`",")","already","take","care","of","the","responsibility","of","calling","this","method","."]
code: def reset_state(self):
      """
      * The caller must guarantee that :meth:`reset_state` should be called **once and only once**
        by the **process that uses the dataflow** before :meth:`__iter__` is called.
        The caller thread of this method should stay alive to keep this dataflow alive.
  
      * It is meant for certain initialization that involves processes,
        e.g., initialize random number generators (RNG), create worker processes.
  
        Because it's very common to use RNG in data processing,
        developers of dataflow can also subclass :class:`RNGDataFlow` to have easier access to
        a properly-initialized RNG.
  
      * A dataflow is not fork-safe after :meth:`reset_state` is called (because this will violate the guarantee).
        There are a few other dataflows that are not fork-safe anytime, which will be mentioned in the docs.
  
      * You should take the responsibility and follow the above guarantee if you're the caller of a dataflow yourself
        (either when you're using dataflow outside of tensorpack, or if you're writing a wrapper dataflow).
  
      * Tensorpack's built-in forking dataflows (:class:`MultiProcessRunner`, :class:`MultiProcessMapData`, etc)
        and other component that uses dataflows (:class:`InputSource`)
        already take care of the responsibility of calling this method.
      """
      pass
  
imports: import threading
  from abc import ABCMeta, abstractmethod
  import six
  from ..utils.utils import get_rng
label_desc: Use image node_id 3 for calling the DataFlow obj's underlying member method code with example usage: obj.reset_state() without return types