code: def _prettifiy_exception(filepath: str):
      """Pretty print the exception that occurred when loading the app."""
      # we want to format the exception as if no frame was on top.
      exp, val, tb = sys.exc_info()
      listing = traceback.format_exception(exp, val, tb)
      # remove the entry for the first frame
      del listing[1]
      listing = [
          f"Found an exception when loading your application from {filepath}. Please, resolve it to run your app.\n\n"
      ] + listing
      logger.error("".join(listing))
      sys.exit(1)
  
imports: import inspect
  import os
  import sys
  import traceback
  import types
  from contextlib import contextmanager
  from copy import copy
  from typing import TYPE_CHECKING, Any, Dict, List, Tuple, Type, Union
  from lightning.app.utilities.exceptions import MisconfigurationException
  from lightning.app.utilities.app_helpers import Logger, _mock_missing_imports
label_desc: Use image node_id 1 for calling a global function with example usage: _prettifiy_exception(filepath) without return types