code: def test_labels(split_collections):
      # Adapted from pylab_examples example code: contour_demo.py
      # see issues #2475, #2843, and #2818 for explanation
      delta = 0.025
      x = np.arange(-3.0, 3.0, delta)
      y = np.arange(-2.0, 2.0, delta)
      X, Y = np.meshgrid(x, y)
      Z1 = np.exp(-(X**2 + Y**2) / 2) / (2 * np.pi)
      Z2 = np.exp(
          -(((X - 1) / 1.5) ** 2 + ((Y - 1) / 0.5) ** 2) / 2
      ) / (2 * np.pi * 0.5 * 1.5)
  
      # difference of Gaussians
      Z = 10.0 * (Z2 - Z1)
  
      fig, ax = plt.subplots(1, 1)
      CS = ax.contour(X, Y, Z)
      disp_units = [(216, 177), (359, 290), (521, 406)]
      data_units = [(-2, 0.5), (0, -1.5), (2.8, 1)]
  
      # Adding labels should invalidate the old style
      _maybe_split_collections(split_collections)
  
      CS.clabel()
  
      for x, y in data_units:
          CS.add_label_near(x, y, inline=True, transform=None)
  
      for x, y in disp_units:
          CS.add_label_near(x, y, inline=True, transform=False)
  
      _maybe_split_collections(split_collections)
  
imports: import datetime
  import platform
  import re
  from unittest import mock
  import contourpy
  import numpy
  from numpy.testing import assert_array_almost_equal, assert_array_almost_equal_nulp, assert_array_equal
  import matplotlib
  from matplotlib import pyplot, rc_context, ticker
  from matplotlib.colors import LogNorm, same_color
  import matplotlib.patches
  from matplotlib.testing.decorators import check_figures_equal, image_comparison
  import pytest
label_desc: Use image node_id 14 for calling a global function with example usage: test_labels(split_collections) without return types