code: def create_notification(
      recipient: ReportRecipients,
      notification_content: NotificationContent,
  ) -> BaseNotification:
      """
      Notification polymorphic factory
      Returns the Notification class for the recipient type
      """
      for plugin in BaseNotification.plugins:
          if plugin.type == recipient.type:
              return plugin(recipient, notification_content)
      raise Exception(  # pylint: disable=broad-exception-raised
          "Recipient type not supported"
      )
  
imports: from superset.reports.models import ReportRecipients
  from superset.reports.notifications.base import BaseNotification, NotificationContent
  from superset.reports.notifications.email import EmailNotification
  from superset.reports.notifications.slack import SlackNotification
label_desc: Use image node_id 1 for calling a global function with example usage: create_notification(recipient, notification_content) and returns: plugin