code: def get_tagged_objects_by_tag_id(
      tag_ids: Optional[list[int]],
      obj_types: Optional[list[str]] = None,
  ) -> list[dict[str, Any]]:
      tags = db.session.query(Tag).filter(Tag.id.in_(tag_ids)).all()
      tag_names = [tag.name for tag in tags]
      return TagDAO.get_tagged_objects_for_tags(tag_names, obj_types)
  
imports: import logging
  from operator import and_
  from typing import Any, Optional
  from flask import g
  from sqlalchemy.exc import SQLAlchemyError
  from superset.commands.tag.exceptions import TagNotFoundError
  from superset.commands.tag.utils import to_object_type
  from superset.daos.base import BaseDAO
  from superset.daos.exceptions import DAODeleteFailedError
  from superset.exceptions import MissingUserContextException
  from superset.extensions import db
  from superset.models.dashboard import Dashboard
  from superset.models.slice import Slice
  from superset.models.sql_lab import SavedQuery
  from superset.tags.models import get_tag, ObjectType, Tag, TaggedObject, TagType, user_favorite_tag_table
  from superset.utils.core import get_user_id
label_desc: Use image node_id 7 for calling the TagDAO obj's underlying member method code with example usage: obj.get_tagged_objects_by_tag_id(tag_ids, obj_types) and returns: TagDAO