def METHOD_NAME(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