code: def _applyValueGettersImpl(container, currentObj, recursionStack):
      """ """
  
      # Detect cycles
      if currentObj in recursionStack:
          return
  
      # Sanity-check of our cycle-detection logic
      assert len(recursionStack) < 1000
  
      # Push the current object on our cycle-detection stack
      recursionStack.append(currentObj)
  
      # Resolve value-getters within dictionaries, tuples and lists
  
      if isinstance(currentObj, dict):
          for key, value in currentObj.items():
              if isinstance(value, ValueGetterBase):
                  currentObj[key] = value(container)
  
              _applyValueGettersImpl(
                  container, currentObj[key], recursionStack
              )
  
      elif isinstance(currentObj, tuple) or isinstance(
          currentObj, list
      ):
          for i, value in enumerate(currentObj):
              # NOTE: values within a tuple should never be value-getters, since
              #       the top-level elements within a tuple are immutable. However,
              #       if any nested sub-elements might be mutable
              if isinstance(value, ValueGetterBase):
                  currentObj[i] = value(container)
  
              _applyValueGettersImpl(
                  container, currentObj[i], recursionStack
              )
  
      else:
          pass
  
      recursionStack.pop()
      return
  
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 5 for calling a global function with example usage: _applyValueGettersImpl(container, currentObj, recursionStack) without return types