class_docstr: Creates a "future" reference to a value within a top-level or a nested
  dictionary.  See also class DeferredDictLookup.
class_docstr_tok: ["Creates","a","``","future","''","reference","to","a","value","within","a","top-level","or","a","nested","dictionary",".","See","also","class","DeferredDictLookup","."]
docstr:   referenceDict: Explicit reference dictionary that contains the field
                  corresonding to the first key name in dictKeyChain.  This may
                  be the result returned by the built-in globals() function,
                  when we desire to look up a dictionary value from a dictionary
                  referenced by a global variable within the calling module.
                  If None is passed for referenceDict, then the topContainer
                  parameter supplied to handleGetValue() will be used as the
                  reference dictionary instead (this allows the desired module
                  to designate the appropriate reference dictionary for the
                  value-getters when it calls applyValueGettersToContainer())
  
    dictKeyChain: One or more strings; the first string is a key (that will
                  eventually be defined) in the reference dictionary. If
                  additional strings are supplied, then the values
                  correspnding to prior key strings must be dictionaries, and
                  each additionl string references a sub-dictionary of the
                  former. The final string is the key of the field whose value
                  will be returned by handleGetValue().
  
    NOTE: Its possible that the referenced value does not yet exist at the
          time of instantiation of this class.  It will be resolved when the
          base description.py calls applyValueGettersToContainer().
  
  
  Example:
    config = dict(
      _dsEncoderFieldName2_N = 70,
      _dsEncoderFieldName2_W = 5,
  
      dsEncoderSchema = [
        dict(
          base=dict(
            fieldname='Name2', type='ScalarEncoder',
            name='Name2', minval=0, maxval=270, clipInput=True,
            n=DictValueGetter(None, '_dsEncoderFieldName2_N'),
            w=DictValueGetter(None, '_dsEncoderFieldName2_W')),
          ),
        ],
    )
  
    updateConfigFromSubConfig(config)
    applyValueGettersToContainer(config)
docstr_tok: ["referenceDict",":","Explicit","reference","dictionary","that","contains","the","field","corresonding","to","the","first","key","name","in","dictKeyChain",".","This","may","be","the","result","returned","by","the","built-in","globals","(",")","function",",","when","we","desire","to","look","up","a","dictionary","value","from","a","dictionary","referenced","by","a","global","variable","within","the","calling","module",".","If","None","is","passed","for","referenceDict",",","then","the","topContainer","parameter","supplied","to","handleGetValue","(",")","will","be","used","as","the","reference","dictionary","instead","(","this","allows","the","desired","module","to","designate","the","appropriate","reference","dictionary","for","the","value-getters","when","it","calls","applyValueGettersToContainer","(",")",")","dictKeyChain",":","One","or","more","strings",";","the","first","string","is","a","key","(","that","will","eventually","be","defined",")","in","the","reference","dictionary",".","If","additional","strings","are","supplied",",","then","the","values","correspnding","to","prior","key","strings","must","be","dictionaries",",","and","each","additionl","string","references","a","sub-dictionary","of","the","former",".","The","final","string","is","the","key","of","the","field","whose","value","will","be","returned","by","handleGetValue","(",")",".","NOTE",":","Its","possible","that","the","referenced","value","does","not","yet","exist","at","the","time","of","instantiation","of","this","class",".","It","will","be","resolved","when","the","base","description.py","calls","applyValueGettersToContainer","(",")",".","Example",":","config","=","dict","(","_dsEncoderFieldName2_N","=","70",",","_dsEncoderFieldName2_W","=","5",",","dsEncoderSchema","=","[","dict","(","base=dict","(","fieldname='Name2","'",",","type='ScalarEncoder","'",",","name='Name2","'",",","minval=0",",","maxval=270",",","clipInput=True",",","n=DictValueGetter","(","None",",","'_dsEncoderFieldName2_N","'",")",",","w=DictValueGetter","(","None",",","'_dsEncoderFieldName2_W","'",")",")",",",")",",","]",",",")","updateConfigFromSubConfig","(","config",")","applyValueGettersToContainer","(","config",")"]
code: def __init__(self, referenceDict, *dictKeyChain):
      """
        referenceDict: Explicit reference dictionary that contains the field
                      corresonding to the first key name in dictKeyChain.  This may
                      be the result returned by the built-in globals() function,
                      when we desire to look up a dictionary value from a dictionary
                      referenced by a global variable within the calling module.
                      If None is passed for referenceDict, then the topContainer
                      parameter supplied to handleGetValue() will be used as the
                      reference dictionary instead (this allows the desired module
                      to designate the appropriate reference dictionary for the
                      value-getters when it calls applyValueGettersToContainer())
  
        dictKeyChain: One or more strings; the first string is a key (that will
                      eventually be defined) in the reference dictionary. If
                      additional strings are supplied, then the values
                      correspnding to prior key strings must be dictionaries, and
                      each additionl string references a sub-dictionary of the
                      former. The final string is the key of the field whose value
                      will be returned by handleGetValue().
  
        NOTE: Its possible that the referenced value does not yet exist at the
              time of instantiation of this class.  It will be resolved when the
              base description.py calls applyValueGettersToContainer().
  
  
      Example:
        config = dict(
          _dsEncoderFieldName2_N = 70,
          _dsEncoderFieldName2_W = 5,
  
          dsEncoderSchema = [
            dict(
              base=dict(
                fieldname='Name2', type='ScalarEncoder',
                name='Name2', minval=0, maxval=270, clipInput=True,
                n=DictValueGetter(None, '_dsEncoderFieldName2_N'),
                w=DictValueGetter(None, '_dsEncoderFieldName2_W')),
              ),
            ],
        )
  
        updateConfigFromSubConfig(config)
        applyValueGettersToContainer(config)
      """
  
      # First, invoke base constructor
      ValueGetterBase.__init__(self)
  
      assert referenceDict is None or isinstance(referenceDict, dict)
      assert len(dictKeyChain) >= 1
  
      self.__referenceDict = referenceDict
      self.__dictKeyChain = dictKeyChain
  
file_path: nupic-legacy/src/nupic/frameworks/opf/exp_description_helpers.py
imports: import os
  import imp
  from nupic.data.dict_utils import rUpdate
label_desc: Use image node_id 1 to create a new DictValueGetter object from inherited base classes: ValueGetterBase with example: obj = DictValueGetter(referenceDict)