code: def const_callback(
      app, flavor, val, outputs, inputs, prevent_initial_call=False
  ):
      kwargs = {}
      if prevent_initial_call != flavor["global"]:
          kwargs["prevent_initial_call"] = prevent_initial_call
  
      if flavor["clientside"]:
          vstr = json.dumps(val)
          app.clientside_callback(
              "function() { return " + vstr + "; }",
              outputs,
              inputs,
              **kwargs,
          )
      else:
  
          @app.callback(outputs, inputs, **kwargs)
          def f(*args):
              return val
  
file_path: dash/tests/integration/callbacks/test_prevent_initial.py
imports: import json
  import pytest
  from flaky import flaky
  from dash import Dash, Input, Output, MATCH, html
  from dash.exceptions import PreventUpdate
label_desc: Use image node_id 3 for calling a global function with example usage: const_callback(app, flavor, val, outputs, inputs, prevent_initial_call) and returns: val