code: def crossdomain(f):
      def wrapped_function(*args, **kwargs):
          resp = make_response(f(*args, **kwargs))
          h = resp.headers
          h["Access-Control-Allow-Origin"] = "*"
          h["Access-Control-Allow-Methods"] = "GET, OPTIONS, POST"
          h["Access-Control-Max-Age"] = str(21600)
          requested_headers = request.headers.get(
              "Access-Control-Request-Headers"
          )
          if requested_headers:
              h["Access-Control-Allow-Headers"] = requested_headers
          return resp
  
      return wrapped_function
  
file_path: bokeh/examples/basic/data/server_sent_events_source.py
imports: import json
  from datetime import datetime
  from time import sleep
  import numpy
  from flask import Flask, Response, make_response, request
  from bokeh.models import CustomJS, ServerSentDataSource
  from bokeh.plotting import figure, show
label_desc: Use image node_id 1 for calling a global function with example usage: crossdomain(f) and returns: wrapped_function, resp