code: def app_with_errors():
      darkly = "https://stackpath.bootstrapcdn.com/bootswatch/4.5.2/darkly/bootstrap.min.css"
      app = Dash(__name__, external_stylesheets=[darkly])
  
      app.layout = html.Div(
          [
              html.Button(
                  id="python", children="Python exception", n_clicks=0
              ),
              html.Div(id="output"),
          ]
      )
  
      @app.callback(
          Output("output", "children"), [Input("python", "n_clicks")]
      )
      def update_output(n_clicks):
          if n_clicks == 1:
              return bad_sub()
          elif n_clicks == 2:
              raise Exception("Special 2 clicks exception")
  
      def bad_sub():
          return 1 / 0
  
      return app
  
file_path: dash/tests/integration/devtools/test_devtools_error_handling.py
imports: from dash import Dash, Input, Output, html, dcc
  from dash.exceptions import PreventUpdate
label_desc: Use image node_id 1 for calling a global function with example usage: app_with_errors() and returns: app, unknown, bad_sub