code: def transform_function(func):
      """Transform the function by replacing its calls based on the
      replace_map."""
      source = inspect.getsource(func)
      tree = ast.parse(source)
      transformed_tree = ReplaceFunction().visit(tree)
      transformed_code = astunparse.unparse(transformed_tree)
  
      namespace = {}
      exec(transformed_code, globals(), namespace)
      return namespace[func.__name__]
  
file_path: ivy/ivy/compiler/replace_with.py
imports: import ast
  import astunparse
  import inspect
label_desc: Use image node_id 2 for calling a global function with example usage: transform_function(func) and returns: namespace