code: def _remove_so_log(trace):
      old_stack_trace = tb.extract_tb(trace)
      old_frames = inspect.getinnerframes(trace)
  
      transpile_frame = None
      module_frame = None
      module_st = None
      traced_lineno = None
  
      new_stack_trace = []
      track = False
  
      for idx, st in enumerate(old_stack_trace):
          if ".pyx" in repr(st):
              continue
          if "<string>" in repr(st):
              if "compiled_fn" in repr(st) and module_frame:
                  track = True
                  traced_lineno = st.lineno
  
          if "<module>" in repr(st):
              module_frame = old_frames[idx]
              module_st = st
          elif (
              transpile_frame is None
              and os.path.join("ivy", "compiler") in st.filename
              and st.name in ["compile", "transpile"]
          ):
              transpile_frame = old_frames[idx]
          elif track:
              ret_st = _align_source(
                  st,
                  transpile_frame,
                  module_frame,
                  module_st,
                  traced_lineno,
              )
              if ret_st:
                  [new_stack_trace.append(r) for r in ret_st]
  
          if track:
              track = False
          else:
              new_stack_trace.append(st)
  
      return new_stack_trace
  
imports: import warnings
  import ivy
  import functools
  from typing import Callable
  import traceback
  import inspect
  import os
  import ast
  import builtins
label_desc: Use image node_id 1 for calling a global function with example usage: _remove_so_log(trace) and returns: new_stack_trace