code: def _create_ret_future(
      self, output_pp_ranks: List[int]
  ) -> Dict[int, List[Future]]:
      num_microbatches = self.num_microbatches
      stage_num = self.stage_num
      up_ret_future = {
          pp_rank: [None] * num_microbatches
          for pp_rank in output_pp_ranks
      }
      down_ret_future = {
          pp_rank + stage_num: [None] * num_microbatches
          for pp_rank in output_pp_ranks
      }
      # merge up and down
      return {**up_ret_future, **down_ret_future}
  
imports: import threading
  from typing import Callable, Dict, List
  import torch
  from torch._C._distributed_rpc import PyRRef
  from torch.futures import Future
  from colossalai.legacy.pipeline.pipeline_process_group import ppg
  from colossalai.legacy.pipeline.rpc._pipeline_base import Phase, PipelineEngineBase, UniqueKey, WorkerBase, WorkItem
label_desc: Use image node_id 5 for calling the ChimeraPipelineEngine obj's underlying member method code with example usage: obj._create_ret_future(output_pp_ranks) and returns: dict