code: def contains_tex_string(text: str) -> bool:
      """Whether a string contains any pair of MathJax default delimiters
      Args:
          text (str): String to check
      Returns:
          bool: True if string contains delimiters, False if not
      """
      # these are non-greedy
      dollars = r"\$\$.*?\$\$"
      braces = r"\\\[.*?\\\]"
      parens = r"\\\(.*?\\\)"
  
      pat = re.compile(f"{dollars}|{braces}|{parens}", flags=re.S)
      return pat.search(text) is not None
  
imports: from __future__ import annotations
  import logging
  import re
  from contextlib import contextmanager
  from typing import TYPE_CHECKING, Any, Iterator, Sequence
  from weakref import WeakKeyDictionary
  from ..core.types import ID
  from ..document.document import Document
  from ..model import Model, collect_models
  from ..settings import settings
  from ..themes.theme import Theme
  from ..util.dataclasses import dataclass, field
  from ..util.serialization import make_globally_unique_css_safe_id, make_globally_unique_id
label_desc: Use image node_id 6 for calling a global function with example usage: contains_tex_string(text) and returns: unknown