class_docstr: Create a path from the text.
docstr: Returns True if the given string *s* contains any mathtext.
docstr_tok: ["Returns","True","if","the","given","string","*","s","*","contains","any","mathtext","."]
code: def is_math_text(self, s):
      """
      Returns True if the given string *s* contains any mathtext.
      """
      # copied from Text.is_math_text -JJL
  
      # Did we find an even number of non-escaped dollar signs?
      # If so, treat is as math text.
      dollar_count = s.count(r"$") - s.count(r"\$")
      even_dollars = dollar_count > 0 and dollar_count % 2 == 0
  
      if rcParams["text.usetex"]:
          return s, "TeX"
  
      if even_dollars:
          return s, True
      else:
          return s.replace(r"\$", "$"), False
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  from collections import OrderedDict
  import six
  from six.moves import zip
  import warnings
  import numpy
  from matplotlib.path import Path
  from matplotlib import rcParams
  import matplotlib.font_manager
  from matplotlib.ft2font import KERNING_DEFAULT, LOAD_NO_HINTING
  from matplotlib.ft2font import LOAD_TARGET_LIGHT
  from matplotlib.mathtext import MathTextParser
  import matplotlib.dviread
  from matplotlib.font_manager import FontProperties, get_font
  from matplotlib.transforms import Affine2D
  from six.moves.urllib.parse import quote
label_desc: Use image node_id 7 for calling the TextPath obj's underlying member method code with example usage: obj.is_math_text(s) and returns: s,  str, s,  True, s,  False