code: def test_bool_autolevel():
      x, y = np.random.rand(2, 9)
      z = (np.arange(9) % 2).reshape((3, 3)).astype(bool)
      m = [
          [False, False, False],
          [False, True, False],
          [False, False, False],
      ]
      assert plt.contour(z.tolist()).levels.tolist() == [0.5]
      assert plt.contour(z).levels.tolist() == [0.5]
      assert plt.contour(np.ma.array(z, mask=m)).levels.tolist() == [
          0.5
      ]
      assert plt.contourf(z.tolist()).levels.tolist() == [0, 0.5, 1]
      assert plt.contourf(z).levels.tolist() == [0, 0.5, 1]
      assert plt.contourf(np.ma.array(z, mask=m)).levels.tolist() == [
          0,
          0.5,
          1,
      ]
      z = z.ravel()
      assert plt.tricontour(x, y, z.tolist()).levels.tolist() == [0.5]
      assert plt.tricontour(x, y, z).levels.tolist() == [0.5]
      assert plt.tricontourf(x, y, z.tolist()).levels.tolist() == [
          0,
          0.5,
          1,
      ]
      assert plt.tricontourf(x, y, z).levels.tolist() == [0, 0.5, 1]
  
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 45 for calling a global function with example usage: test_bool_autolevel() without return types