docstr: deletes tags from a list of tag names
docstr_tok: ["deletes","tags","from","a","list","of","tag","names"]
code: def delete_tags(tag_names: list[str]) -> None:
      """
      deletes tags from a list of tag names
      """
      tags_to_delete = []
      for name in tag_names:
          tag_name = name.strip()
          if not TagDAO.find_by_name(tag_name):
              raise DAODeleteFailedError(
                  message=f"Tag with name {tag_name} does not exist."
              )
          tags_to_delete.append(tag_name)
      tag_objects = db.session.query(Tag).filter(
          Tag.name.in_(tags_to_delete)
      )
      for tag in tag_objects:
          try:
              db.session.delete(tag)
              db.session.commit()
          except SQLAlchemyError as ex:  # pragma: no cover
              db.session.rollback()
              raise DAODeleteFailedError(exception=ex) from ex
  
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 3 for calling the TagDAO obj's underlying member method code with example usage: obj.delete_tags(tag_names) without return types