code: def insert_callback(
      callback_list,
      callback_map,
      config_prevent_initial_callbacks,
      output,
      outputs_indices,
      inputs,
      state,
      inputs_state_indices,
      prevent_initial_call,
      long=None,
      manager=None,
      dynamic_creator=False,
  ):
      if prevent_initial_call is None:
          prevent_initial_call = config_prevent_initial_callbacks
  
      _validate.validate_duplicate_output(
          output, prevent_initial_call, config_prevent_initial_callbacks
      )
  
      callback_id = create_callback_id(output, inputs)
      callback_spec = {
          "output": callback_id,
          "inputs": [c.to_dict() for c in inputs],
          "state": [c.to_dict() for c in state],
          "clientside_function": None,
          # prevent_initial_call can be a string "initial_duplicates"
          # which should not prevent the initial call.
          "prevent_initial_call": prevent_initial_call is True,
          "long": long
          and {
              "interval": long["interval"],
          },
          "dynamic_creator": dynamic_creator,
      }
  
      callback_map[callback_id] = {
          "inputs": callback_spec["inputs"],
          "state": callback_spec["state"],
          "outputs_indices": outputs_indices,
          "inputs_state_indices": inputs_state_indices,
          "long": long,
          "output": output,
          "raw_inputs": inputs,
          "manager": manager,
      }
      callback_list.append(callback_spec)
  
      return callback_id
  
file_path: dash/dash/_callback.py
imports: import collections
  import hashlib
  from functools import wraps
  import flask
  from .dependencies import handle_callback_args, handle_grouped_callback_args, Output
  from .exceptions import PreventUpdate, WildcardInLongCallback, MissingLongCallbackManagerError, LongCallbackError
  from ._grouping import flatten_grouping, make_grouping_by_index, grouping_len
  from ._utils import create_callback_id, stringify_id, to_json, coerce_to_list, AttributeDict, clean_property_name
  from .None import _validate
  from .long_callback.managers import BaseLongCallbackManager
  from ._callback_context import context_value
label_desc: Use image node_id 4 for calling a global function with example usage: insert_callback(callback_list, callback_map, config_prevent_initial_callbacks, output, outputs_indices, inputs, state, inputs_state_indices, prevent_initial_call, long, manager, dynamic_creator) and returns: callback_id