code: def dict_list_map_outplace(f: Callable, x: Union[dict, list]):
      if isinstance(x, dict):
          return {k: dict_list_map_outplace(f, v) for k, v in x.items()}
      elif isinstance(x, list):
          return [dict_list_map_outplace(f, v) for v in x]
      else:
          return f(x)
  
file_path: megatron-lm/megatron/core/dist_checkpointing/dict_utils.py
imports: from collections import defaultdict
  from typing import Any, Callable, Iterable, Optional, Tuple, Union
  import torch
label_desc: Use image node_id 10 for calling a global function with example usage: dict_list_map_outplace(f, x) and returns: unknown, unknown, f