code: def recurse(f):
      seq = (list, tuple, set)
  
      def wrapper(data, *args):
          g = rpartial(wrapper, *args)
          if isinstance(data, Mapping):
              return {g(k): g(v) for k, v in data.items()}
          if isinstance(data, seq):
              return type(data)(map(g, data))
          if isinstance(data, str):
              return f(data, *args)
          return data
  
      return wrapper
  
imports: import os
  import re
  import typing
  from collections.abc import Iterable, Mapping
  from functools import singledispatch
  from funcy import memoize, rpartial
  from dvc.exceptions import DvcException
  from dvc.utils.flatten import flatten
label_desc: Use image node_id 12 for calling a global function with example usage: recurse(f) and returns: wrapper, data, unknown, type, f