code: def varmap(func, var, context=None, name=None):
      
      if context is None:
          context = {}
      objid = id(var)
      if objid in context:
          return func(name, '<...>')
      context[objid] = 1
      if isinstance(var, (list, tuple)):
          ret = [varmap(func, f, context, name) for f in var]
      else:
          ret = func(name, var)
          if isinstance(ret, dict):
              ret = dict((k, varmap(func, v, context, k))
                         for k, v in iteritems(var))
      del context[objid]
      return ret
docs: Executes ``func(key_name, value)`` on all values
      recurisively discovering dict and list scoped
      values.