code: def resolve_indirect(pdict):
      
  
      inner = IndirectDict() if isinstance(pdict, IndirectDict) else {}
      needs_eval = False
      for k, value in iteritems(pdict):
          if isinstance(value, StepValueFrom):
              inner[k] = value.inner
              needs_eval = True
          else:
              inner[k] = value
      res = _resolve_indirect_inner(inner)
      if needs_eval:
          ev = {}
          for k, value in iteritems(pdict):
              if isinstance(value, StepValueFrom):
                  ev[k] = value.do_eval(res, res[k])
              else:
                  ev[k] = res[k]
          return ev
      return res
docs: Resolve the contents an indirect dictionary (containing promises) and
      evaluate expressions to produce the dictionary of actual values.