code: def _cleanup(dash: Dashboard, slice_name: str) -> None:
      db.session.delete(dash)
      if slice_name:
          slice = (
              db.session.query(Slice)
              .filter_by(slice_name=slice_name)
              .one_or_none()
          )
          db.session.delete(slice)
      db.session.commit()
  
file_path: superset/tests/integration_tests/fixtures/unicode_dashboard.py
imports: import pandas
  import pytest
  from sqlalchemy import String
  from superset import db
  from superset.connectors.sqla.models import SqlaTable
  from superset.models.dashboard import Dashboard
  from superset.models.slice import Slice
  from superset.utils.core import get_example_default_schema
  from superset.utils.database import get_example_database
  from tests.integration_tests.dashboard_utils import create_dashboard, create_slice, create_table_metadata
  from tests.integration_tests.test_app import app
label_desc: Use image node_id 8 for calling a global function with example usage: _cleanup(dash, slice_name) without return types