code: def wrap_notification(self, data):
          
          if "method" in data:
              method = data["method"]
              params = data["params"]
              change = params[0]
              if method == "notifyPowerStatus":
                  return PowerChange.make(**change)
              elif method == "notifyVolumeInformation":
                  return VolumeChange.make(**change)
              elif method == "notifyPlayingContentInfo":
                  return ContentChange.make(**change)
              elif method == "notifySettingsUpdate":
                  return SettingChange.make(**change)
              elif method == "notifySWUpdateInfo":
                  return SoftwareUpdateChange.make(**change)
              else:
                  _LOGGER.warning("Got unknown notification type: %s", method)
          elif "result" in data:
              result = data["result"][0]
              if "enabled" in result and "enabled" in result:
                  return NotificationChange(**result)
          else:
              _LOGGER.warning("Unknown notification, returning raw: %s", data)
              return data
docs: Convert notification JSON to a notification class.