code: def test_delete_tagged_objects(self):
      self.login(username="admin")
      dashboard_id = 1
      dashboard_type = ObjectType.dashboard
      tag_names = ["example_tag_1", "example_tag_2"]
      tags = db.session.query(Tag).filter(Tag.name.in_(tag_names))
      assert tags.count() == 2
      self.insert_tagged_object(
          tag_id=tags.first().id,
          object_id=dashboard_id,
          object_type=dashboard_type,
      )
      self.insert_tagged_object(
          tag_id=tags[1].id,
          object_id=dashboard_id,
          object_type=dashboard_type,
      )
      tagged_object = (
          db.session.query(TaggedObject)
          .filter(
              TaggedObject.tag_id == tags.first().id,
              TaggedObject.object_id == dashboard_id,
              TaggedObject.object_type == dashboard_type.name,
          )
          .first()
      )
      other_tagged_object = (
          db.session.query(TaggedObject)
          .filter(
              TaggedObject.tag_id == tags[1].id,
              TaggedObject.object_id == dashboard_id,
              TaggedObject.object_type == dashboard_type.name,
          )
          .first()
      )
      assert tagged_object is not None
      uri = f"api/v1/tag/{dashboard_type.value}/{dashboard_id}/{tags.first().name}"
      rv = self.client.delete(uri, follow_redirects=True)
      # successful request
      self.assertEqual(rv.status_code, 200)
      # ensure that tagged object no longer exists
      tagged_object = (
          db.session.query(TaggedObject)
          .filter(
              TaggedObject.tag_id == tags.first().id,
              TaggedObject.object_id == dashboard_id,
              TaggedObject.object_type == dashboard_type.name,
          )
          .first()
      )
      assert not tagged_object
      # ensure the other tagged objects still exist
      other_tagged_object = (
          db.session.query(TaggedObject)
          .filter(
              TaggedObject.object_id == dashboard_id,
              TaggedObject.object_type == dashboard_type.name,
              TaggedObject.tag_id == tags[1].id,
          )
          .first()
      )
      assert other_tagged_object is not None
      # clean up tagged object
      db.session.delete(other_tagged_object)
  
imports: import json
  from datetime import datetime
  from flask import g
  import pytest
  import prison
  from freezegun import freeze_time
  from sqlalchemy.sql import func
  from sqlalchemy import and_
  from superset.models.dashboard import Dashboard
  from superset.models.slice import Slice
  from superset.models.sql_lab import SavedQuery
  from superset.tags.models import user_favorite_tag_table
  from unittest.mock import patch
  import tests.integration_tests.test_app
  from superset import db, security_manager
  from superset.common.db_query_status import QueryStatus
  from superset.models.core import Database
  from superset.utils.database import get_example_database, get_main_database
  from superset.tags.models import ObjectType, Tag, TagType, TaggedObject
  from tests.integration_tests.fixtures.birth_names_dashboard import load_birth_names_dashboard_with_slices, load_birth_names_data
  from tests.integration_tests.fixtures.world_bank_dashboard import load_world_bank_dashboard_with_slices, load_world_bank_data
  from tests.integration_tests.fixtures.tags import with_tagging_system_feature
  from tests.integration_tests.base_tests import SupersetTestCase
  from superset.daos.tag import TagDAO
  from superset.tags.models import ObjectType
label_desc: Use image node_id 8 for calling the TestTagApi obj's underlying member method code with example usage: obj.test_delete_tagged_objects() without return types