code: def build_derived_callback(derived_stream):
      """
      Build StreamCallback for Derived stream
  
      Args:
          derived_stream: A Derived stream
  
      Returns:
          StreamCallback
      """
      input_ids = [
          id(stream) for stream in derived_stream.input_streams
      ]
      constants = copy.copy(derived_stream.constants)
      transform = derived_stream.transform_function
  
      def derived_callback(*stream_values):
          return transform(
              stream_values=stream_values, constants=constants
          )
  
      return StreamCallback(
          input_ids=input_ids,
          fn=derived_callback,
          output_id=id(derived_stream),
      )
  
imports: import base64
  import copy
  import pickle
  import uuid
  from collections import namedtuple
  from dash.exceptions import PreventUpdate
  import holoviews
  from holoviews.core.decollate import expr_to_fn_of_stream_contents, initialize_dynamic, to_expr_extract_streams
  from holoviews.plotting.plotly import DynamicMap, PlotlyRenderer
  from holoviews.plotting.plotly.callbacks import BoundsXCallback, BoundsXYCallback, BoundsYCallback, RangeXCallback, RangeXYCallback, RangeYCallback, Selection1DCallback
  from holoviews.plotting.plotly.util import clean_internal_figure_properties
  from holoviews.streams import Derived, History
  import plotly.graph_objects
  from dash import callback_context
  from dash.dependencies import Input, Output, State
label_desc: Use image node_id 5 for calling a global function with example usage: build_derived_callback(derived_stream) and returns: StreamCallback, transform