code: def _is_invalid_contour(x, y):
      """
      Utility function for _contour_trace
  
      Contours with an area of the order as 1 pixel are considered spurious.
      """
      too_small = np.all(np.abs(x - x[0]) < 2) and np.all(
          np.abs(y - y[0]) < 2
      )
      return too_small
  
file_path: plotly.py/packages/python/plotly/plotly/figure_factory/_ternary_contour.py
imports: import plotly.colors
  from plotly.graph_objs import graph_objs
  from plotly import exceptions
  from plotly import optional_imports
  from skimage import measure
label_desc: Use image node_id 10 for calling a global function with example usage: _is_invalid_contour(x, y) and returns: too_small