code: def get_app():
      app = dash.Dash(__name__)
  
      columns = [{"name": i, "id": i} for i in ["a", "b"]]
      data = [dict(a=1, b=2), dict(a=11, b=22)]
  
      app.layout = Div(
          [
              Button(id="clear-table", children=["Clear table"]),
              DataTable(id="table", columns=columns, data=data),
          ]
      )
  
      @app.callback(
          [Output("table", "data"), Output("table", "columns")],
          [Input("clear-table", "n_clicks")],
      )
      def clear_table(n_clicks):
          if n_clicks is None:
              raise PreventUpdate
  
          nonlocal columns, data
  
          return (data, columns) if n_clicks % 2 == 0 else (None, None)
  
      return app
  
imports: import dash
  from dash.dependencies import Input, Output
  from dash.exceptions import PreventUpdate
  from dash.dash_table import DataTable
  from dash.html import Button, Div
label_desc: Use image node_id 1 for calling a global function with example usage: get_app() and returns: app, unknown