code: def create_dashboard_report(dashboard, extra, **kwargs):
      report_schedule = create_report_notification(
          email_target="target@example.com",
          dashboard=dashboard,
          extra={
              "dashboard": extra,
          },
          **kwargs,
      )
      error = None
  
      try:
          yield report_schedule
      except Exception as ex:  # pylint: disable=broad-except
          error = ex
  
      # make sure to clean up in case of yield exceptions
      cleanup_report_schedule(report_schedule)
  
      if error:
          raise error
  
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 4 for calling a global function with example usage: create_dashboard_report(dashboard, extra) without return types