code: function patchWidgetClass(widgetClass) {
      const superWidgetClassPrototype = Object.getPrototypeOf(widgetClass.prototype);
      // Patch subscribe method.
      superWidgetClassPrototype.subscribe = Widget.prototype.subscribe;
      // Patch publish method.
      superWidgetClassPrototype.publish = Widget.prototype.publish;
  }
docs: Patches given widget class which extends from a deprecated version of @wso2-dashboards/widget class, to be
  compatible with newer versions.
  @param {class} widgetClass widget class to be patched
  @private