class_docstr: Mixin to provide labelling capability to `.ContourSet`.
class_docstr_tok: ["Mixin","to","provide","labelling","capability","to","`",".ContourSet","`","."]
docstr: Return whether a label is already near this location.
docstr_tok: ["Return","whether","a","label","is","already","near","this","location","."]
code: def too_close(self, x, y, lw):
      """Return whether a label is already near this location."""
      thresh = (1.2 * lw) ** 2
      return any(
          (x - loc[0]) ** 2 + (y - loc[1]) ** 2 < thresh
          for loc in self.labelXYs
      )
  
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 3 for calling the ContourLabeler obj's underlying member method code with example usage: obj.too_close(x, y, lw) and returns: any