code: def get_real_args_kwargs(args_or_kwargs):
      args_or_kwargs = pytree_map(
          args_or_kwargs, fn=lambda x: x.wait(), process_types=Future
      )
      # TODO : combine producer and consumer
      # by default, merge all args in the output args or kwargs
      if args_or_kwargs is not None:
          if isinstance(args_or_kwargs, dict):
              pass
          else:
              flatten_args = []
              pytree_map(
                  args_or_kwargs,
                  fn=lambda x: flatten_args.append(x),
                  map_all=True,
              )
              args_or_kwargs = flatten_args
  
      return args_or_kwargs
  
imports: import argparse
  import os
  import warnings
  from typing import Any, Callable, Tuple, Type, Union
  import torch
  import torch.distributed.rpc
  import torch.multiprocessing
  from torch._C._distributed_rpc import _is_current_rpc_agent_set
  from torch.futures import Future
  from colossalai.initialize import launch
  from colossalai.legacy.pipeline.pipeline_process_group import ppg
label_desc: Use image node_id 8 for calling a global function with example usage: get_real_args_kwargs(args_or_kwargs) and returns: args_or_kwargs