code: def _configure_stack_trace(traceback):
      """Configure the stack trace to be displayed in the console.
  
      Parameters
      ----------
      traceback
          the traceback object
      """
      tb = traceback
      trace_mode = ivy.exception_trace_mode
      show_wrappers = ivy.show_func_wrapper_trace_mode
  
      ivy_path = os.path.join("ivy", "functional", "ivy")
      frontend_path = os.path.join("ivy", "functional", "frontends")
      wrapper_path = os.path.join("ivy", "func_wrapper.py")
  
      while tb.tb_next:
          frame = tb.tb_next.tb_frame
          file_path = frame.f_code.co_filename
          if trace_mode == "ivy":
              if _check_if_path_found(ivy_path, file_path):
                  tb = tb.tb_next
              else:
                  tb.tb_next = tb.tb_next.tb_next
          elif trace_mode == "frontend":
              if _check_if_path_found(
                  frontend_path, file_path
              ) or _check_if_path_found(ivy_path, file_path):
                  tb = tb.tb_next
              else:
                  tb.tb_next = tb.tb_next.tb_next
          elif not show_wrappers:
              if _check_if_path_found(wrapper_path, file_path):
                  tb.tb_next = tb.tb_next.tb_next
              else:
                  tb = tb.tb_next
          else:
              tb = tb.tb_next
  
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 5 for calling a global function with example usage: _configure_stack_trace(traceback) without return types