class_docstr: The dashboard class, wraps the dashboard component.
class_docstr_tok: ["The","dashboard","class",",","wraps","the","dashboard","component","."]
docstr: To enable multiple dashboards to run in the same notebook we need to
  prevent them from using the same method names (in addition to using
  dedicated ports). We rename the function for that purpose and
  manually add the URL rule instead of using the route decorator.
docstr_tok: ["To","enable","multiple","dashboards","to","run","in","the","same","notebook","we","need","to","prevent","them","from","using","the","same","method","names","(","in","addition","to","using","dedicated","ports",")",".","We","rename","the","function","for","that","purpose","and","manually","add","the","URL","rule","instead","of","using","the","route","decorator","."]
code: def add_url_rule(self, func, route, methods):
      """To enable multiple dashboards to run in the same notebook we need to
      prevent them from using the same method names (in addition to using
      dedicated ports). We rename the function for that purpose and
      manually add the URL rule instead of using the route decorator.
      """
      func.__name__ = func.__name__ + str(id(self))
      self._service.app.add_url_rule(
          route, endpoint=func.__name__, view_func=func, methods=methods
      )
  
imports: import json
  import os
  import uuid
  from html.parser import HTMLParser
  from rai_core_flask import FlaskHelper
  from raiutils.data_processing import serialize_json_safe
  from raiwidgets.interfaces import WidgetRequestResponseConstants
label_desc: Use image node_id 6 for calling the Dashboard obj's underlying member method code with example usage: obj.add_url_rule(func, route, methods) without return types