code: def _recursive_map(
      target: _typing.Union[list, tuple, dict, set, _T],
      map_fn: _typing.Callable[[_T], _U],
  ) -> _typing.Union[list, tuple, dict, set, _U]:
      if isinstance(target, list):
          return type(target)(
              [_recursive_map(x, map_fn) for x in target]
          )
      elif isinstance(target, tuple):
          return type(target)(
              [_recursive_map(x, map_fn) for x in target]
          )
      elif isinstance(target, dict):
          return type(target)(
              {k: _recursive_map(v, map_fn) for k, v in target.items()}
          )
      elif isinstance(target, set):
          return type(target)(
              {_recursive_map(x, map_fn) for x in target}
          )
      else:
          return map_fn(target)
  
file_path: higher/higher/utils.py
imports: import torch
  import typing
label_desc: Use image node_id 3 for calling a global function with example usage: _recursive_map(target, map_fn) and returns: type, type, type, type, map_fn