class_docstr: Mixin to provide labelling capability to `.ContourSet`.
class_docstr_tok: ["Mixin","to","provide","labelling","capability","to","`",".ContourSet","`","."]
docstr: Get the text of the label.
docstr_tok: ["Get","the","text","of","the","label","."]
code: def get_text(self, lev, fmt):
      """Get the text of the label."""
      if isinstance(lev, str):
          return lev
      elif isinstance(fmt, dict):
          return fmt.get(lev, "%1.3f")
      elif callable(getattr(fmt, "format_ticks", None)):
          return fmt.format_ticks([*self.labelLevelList, lev])[-1]
      elif callable(fmt):
          return fmt(lev)
      else:
          return fmt % lev
  
imports: from contextlib import ExitStack
  import functools
  import math
  from numbers import Integral
  import numpy
  from numpy import ma
  import matplotlib
  from matplotlib import _api, _docstring
  from matplotlib.backend_bases import MouseButton
  from matplotlib.lines import Line2D
  from matplotlib.path import Path
  from matplotlib.text import Text
  import matplotlib.ticker
  import matplotlib.cm
  import matplotlib.colors
  import matplotlib.collections
  import matplotlib.font_manager
  import matplotlib.cbook
  import matplotlib.patches
  import matplotlib.transforms
label_desc: Use image node_id 5 for calling the ContourLabeler obj's underlying member method code with example usage: obj.get_text(lev, fmt) and returns: lev, fmt, fmt, fmt, unknown