code: def create_report_notification(
      email_target: Optional[str] = None,
      slack_channel: Optional[str] = None,
      chart: Optional[Slice] = None,
      dashboard: Optional[Dashboard] = None,
      database: Optional[Database] = None,
      sql: Optional[str] = None,
      report_type: ReportScheduleType = ReportScheduleType.REPORT,
      validator_type: Optional[str] = None,
      validator_config_json: Optional[str] = None,
      grace_period: Optional[int] = None,
      report_format: Optional[ReportDataFormat] = None,
      name: Optional[str] = None,
      extra: Optional[dict[str, Any]] = None,
      force_screenshot: bool = False,
      owners: Optional[list[User]] = None,
  ) -> ReportSchedule:
      if not owners:
          owners = [
              (
                  db.session.query(security_manager.user_model)
                  .filter_by(email=DEFAULT_OWNER_EMAIL)
                  .one_or_none()
              )
          ]
  
      if slack_channel:
          recipient = ReportRecipients(
              type=ReportRecipientType.SLACK,
              recipient_config_json=json.dumps(
                  {
                      "target": slack_channel,
                  }
              ),
          )
      else:
          recipient = ReportRecipients(
              type=ReportRecipientType.EMAIL,
              recipient_config_json=json.dumps(
                  {"target": email_target}
              ),
          )
  
      if name is None:
          name = "report_with_csv" if report_format else "report"
  
      report_schedule = insert_report_schedule(
          report_type,
          name=name,
          crontab="0 9 * * *",
          description="Daily report",
          sql=sql,
          chart=chart,
          dashboard=dashboard,
          database=database,
          recipients=[recipient],
          owners=owners,
          validator_type=validator_type,
          validator_config_json=validator_config_json,
          grace_period=grace_period,
          report_format=report_format or ReportDataFormat.VISUALIZATION,
          extra=extra,
          force_screenshot=force_screenshot,
      )
      return report_schedule
  
file_path: superset/tests/integration_tests/reports/utils.py
imports: import json
  from contextlib import contextmanager
  from typing import Any, Optional
  from uuid import uuid4
  from flask_appbuilder.security.sqla.models import User
  from superset import db, security_manager
  from superset.models.core import Database
  from superset.models.dashboard import Dashboard
  from superset.models.slice import Slice
  from superset.reports.models import ReportDataFormat, ReportExecutionLog, ReportRecipients, ReportRecipientType, ReportSchedule, ReportScheduleType, ReportState
  from superset.utils.core import override_user
  from tests.integration_tests.test_app import app
  from tests.integration_tests.utils import read_fixture
label_desc: Use image node_id 2 for calling a global function with example usage: create_report_notification(email_target, slack_channel, chart, dashboard, database, sql, report_type, validator_type, validator_config_json, grace_period, report_format, name, extra, force_screenshot, owners) and returns: report_schedule