code: def test_get_objects_from_tag_with_id(self):
      # create tagged objects
      dashboard = (
          db.session.query(Dashboard)
          .filter(Dashboard.dashboard_title == "World Bank's Data")
          .first()
      )
      dashboard_id = dashboard.id
      tag_1 = (
          db.session.query(Tag).filter_by(name="example_tag_1").one()
      )
      tag_2 = (
          db.session.query(Tag).filter_by(name="example_tag_2").one()
      )
      tag_ids = [tag_1.id, tag_2.id]
      self.insert_tagged_object(
          object_id=dashboard_id,
          object_type=ObjectType.dashboard,
          tag_id=tag_1.id,
      )
      # get objects
      tagged_objects = TagDAO.get_tagged_objects_by_tag_id(tag_ids)
      assert len(tagged_objects) == 1
  
      # test get objects from tag with type
      tagged_objects = TagDAO.get_tagged_objects_by_tag_id(
          tag_ids, obj_types=["dashboard", "chart"]
      )
      assert len(tagged_objects) == 1
  
      tagged_objects = TagDAO.get_tagged_objects_by_tag_id(
          tag_ids, obj_types=["chart"]
      )
      assert len(tagged_objects) == 0
  
imports: from operator import and_
  from unittest.mock import patch
  import pytest
  from superset.daos.exceptions import DAOCreateFailedError, DAOException
  from superset.models.slice import Slice
  from superset.models.sql_lab import SavedQuery
  from superset.daos.tag import TagDAO
  from superset.tags.exceptions import InvalidTagNameError
  from superset.tags.models import ObjectType, Tag, TaggedObject
  from tests.integration_tests.tags.api_tests import TAGS_FIXTURE_COUNT
  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
  from tests.integration_tests.fixtures.tags import with_tagging_system_feature
label_desc: Use image node_id 7 for calling the TestTagsDAO obj's underlying member method code with example usage: obj.test_get_objects_from_tag_with_id() without return types