code: def apply_alias(fn, name_map):
      def _inner(data):
          # map names
          pre_call = dict(data)
          for _from, _to in name_map.items():
              pre_call[_to] = pre_call.pop(_from)
  
          # execute
          post_call = fn(pre_call)
  
          # map names back
          for _from, _to in name_map.items():
              post_call[_from] = post_call.pop(_to)
  
          return post_call
  
      return _inner
  
file_path: MONAI/monai/transforms/adaptors.py
imports: from __future__ import annotations
  from typing import Callable
  from monai.utils import export
label_desc: Use image node_id 2 for calling a global function with example usage: apply_alias(fn, name_map) and returns: _inner, post_call