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
  
imports: import numpy
  from flask import Flask, jsonify, make_response, request
  from bokeh.models import AjaxDataSource, CustomJS
  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