class_docstr: The dashboard class, wraps the dashboard component.
class_docstr_tok: ["The","dashboard","class",",","wraps","the","dashboard","component","."]
code: def load_widget_file(self, path):
      js_path = Dashboard.get_widget_path(path)
      with open(js_path, "r", encoding="utf-8") as f:
          content = f.read()
          content = content.replace(
              "__rai_app_id__", f"rai_widget_{self.id}"
          )
          content = content.replace(
              '"__rai_config__"', f"`{json.dumps(self.config)}`"
          )
          model_data = json.dumps(
              self.model_data, default=serialize_json_safe
          )
          content = content.replace(
              '"__rai_model_data__"', f"`{model_data}`"
          )
          return content
  
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 5 for calling the Dashboard obj's underlying member method code with example usage: obj.load_widget_file(path) and returns: content