code: def run(self) -> Model:
      self.validate()
      assert self._model
  
      try:
          dashboard = DashboardDAO.update(
              self._model, self._properties, commit=False
          )
          if self._properties.get("json_metadata"):
              dashboard = DashboardDAO.set_dash_metadata(
                  dashboard,
                  data=json.loads(
                      self._properties.get("json_metadata", "{}")
                  ),
                  commit=False,
              )
          db.session.commit()
      except DAOUpdateFailedError as ex:
          logger.exception(ex.exception)
          raise DashboardUpdateFailedError() from ex
      return dashboard
  
file_path: superset/superset/commands/dashboard/update.py
imports: import json
  import logging
  from typing import Any, Optional
  from flask_appbuilder.models.sqla import Model
  from marshmallow import ValidationError
  from superset import security_manager
  from superset.commands.base import BaseCommand, UpdateMixin
  from superset.commands.dashboard.exceptions import DashboardForbiddenError, DashboardInvalidError, DashboardNotFoundError, DashboardSlugExistsValidationError, DashboardUpdateFailedError
  from superset.commands.utils import populate_roles
  from superset.daos.dashboard import DashboardDAO
  from superset.daos.exceptions import DAOUpdateFailedError
  from superset.exceptions import SupersetSecurityException
  from superset.extensions import db
  from superset.models.dashboard import Dashboard
label_desc: Use image node_id 2 for calling the UpdateDashboardCommand obj's underlying member method code with example usage: obj.run() and returns: dashboard