code: def test_copy_dashboard(self, mock_g):
      mock_g.user = security_manager.find_user("admin")
      original_dash = (
          db.session.query(Dashboard)
          .filter_by(slug="world_health")
          .first()
      )
      metadata = json.loads(original_dash.json_metadata)
      metadata["positions"] = original_dash.position
      dash_data = {
          "dashboard_title": "copied dash",
          "json_metadata": json.dumps(metadata),
          "css": "<css>",
          "duplicate_slices": False,
      }
      dash = DashboardDAO.copy_dashboard(original_dash, dash_data)
      self.assertNotEqual(dash.id, original_dash.id)
      self.assertEqual(len(dash.position), len(original_dash.position))
      self.assertEqual(dash.dashboard_title, "copied dash")
      self.assertEqual(dash.css, "<css>")
      self.assertEqual(
          dash.owners, [security_manager.find_user("admin")]
      )
      self.assertCountEqual(dash.slices, original_dash.slices)
  
      db.session.delete(dash)
      db.session.commit()
  
file_path: superset/tests/integration_tests/dashboards/dao_tests.py
imports: import copy
  import json
  import time
  from unittest.mock import patch
  import pytest
  import tests.integration_tests.test_app
  from superset import db, security_manager
  from superset.daos.dashboard import DashboardDAO
  from superset.models.dashboard import Dashboard
  from tests.integration_tests.base_tests import SupersetTestCase
  from tests.integration_tests.fixtures.world_bank_dashboard import load_world_bank_dashboard_with_slices, load_world_bank_data
label_desc: Use image node_id 2 for calling the TestDashboardDAO obj's underlying member method code with example usage: obj.test_copy_dashboard(mock_g) without return types