code: def _recover_dt(complex_iter):
      """_recover_dt.
  
      replace all the DelayedTask in the `complex_iter` with its `.res` value
  
      FIXME: this function may cause infinite loop when the complex data-structure contains loop-reference
  
      Parameters
      ----------
      complex_iter :
          complex_iter
      """
      if isinstance(complex_iter, DelayedTask):
          return complex_iter.get_replacement()
      elif isinstance(complex_iter, (list, tuple)):
          return [_recover_dt(item) for item in complex_iter]
      elif isinstance(complex_iter, dict):
          return {
              key: _recover_dt(item)
              for key, item in complex_iter.items()
          }
      else:
          return complex_iter
  
imports: from functools import partial
  from threading import Thread
  from typing import Callable, Text, Union
  from joblib import Parallel, delayed
  from joblib._parallel_backends import MultiprocessingBackend
  import pandas
  from queue import Queue
  import concurrent
  from qlib.config import C, QlibConfig
label_desc: Use image node_id 4 for calling a global function with example usage: _recover_dt(complex_iter) and returns: complex_iter, unknown, unknown, complex_iter