code: def test_copy_dashboard_via_dao(self):
      source = (
          db.session.query(Dashboard)
          .filter_by(slug="world_health")
          .first()
      )
  
      data = {
          "dashboard_title": "copied dash",
          "css": "<css>",
          "duplicate_slices": False,
          "json_metadata": json.dumps(
              {
                  "positions": source.position,
                  "color_namespace": "Color Namespace Test",
                  "color_scheme": "Color Scheme Test",
              }
          ),
      }
  
      with override_user(security_manager.find_user("gamma")):
          with pytest.raises(DashboardForbiddenError):
              DashboardDAO.copy_dashboard(source, data)
  
      with override_user(security_manager.find_user("admin")):
          target = DashboardDAO.copy_dashboard(source, data)
          db.session.delete(target)
  
      db.session.commit()
  
imports: import json
  from unittest import mock
  from unittest.mock import patch
  import pytest
  from superset.commands.dashboard.exceptions import DashboardForbiddenError
  from superset.daos.dashboard import DashboardDAO
  from superset.utils.core import backend, override_user
  from tests.integration_tests.conftest import with_feature_flags
  from tests.integration_tests.dashboards.dashboard_test_utils import *
  from tests.integration_tests.dashboards.security.base_case import BaseTestDashboardSecurity
  from tests.integration_tests.dashboards.superset_factory_util import create_dashboard_to_db, create_database_to_db, create_datasource_table_to_db, create_slice_to_db
  from tests.integration_tests.fixtures.birth_names_dashboard import load_birth_names_dashboard_with_slices, load_birth_names_data
  from tests.integration_tests.fixtures.public_role import public_role_like_gamma
  from tests.integration_tests.fixtures.query_context import get_query_context
  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 22 for calling the TestDashboardRoleBasedSecurity obj's underlying member method code with example usage: obj.test_copy_dashboard_via_dao() without return types