code: def check_worker_dashboard_exits(scheduler, worker):
      """Check addr:port exists as a worker in scheduler list
  
      Parameters
      ----------
      worker : str
          addr:port
  
      Returns
      -------
      bool
      """
      addr, port = worker.split(":")
      workers = list(scheduler.workers.values())
      for w in workers:
          bokeh_port = w.services.get("dashboard", "")
          if addr == w.host and port == str(bokeh_port):
              return True
      return False
  
label_desc: Use image node_id 1 for calling a global function with example usage: check_worker_dashboard_exits(scheduler, worker) and returns: False, True