code: def test_masks():
      # Square
      mask = tf._square_mask(2)
      np.testing.assert_equal(mask, np.ones((5, 5), dtype="bool"))
      np.testing.assert_equal(
          tf._square_mask(0), np.ones((1, 1), dtype="bool")
      )
      # Circle
      np.testing.assert_equal(
          tf._circle_mask(0), np.ones((1, 1), dtype="bool")
      )
      out = np.array([[1, 1, 1], [1, 1, 1], [1, 1, 1]], dtype="bool")
      np.testing.assert_equal(tf._circle_mask(1), out)
      out = np.array(
          [
              [0, 0, 1, 1, 1, 0, 0],
              [0, 1, 1, 1, 1, 1, 0],
              [1, 1, 1, 1, 1, 1, 1],
              [1, 1, 1, 1, 1, 1, 1],
              [1, 1, 1, 1, 1, 1, 1],
              [0, 1, 1, 1, 1, 1, 0],
              [0, 0, 1, 1, 1, 0, 0],
          ],
          dtype="bool",
      )
      np.testing.assert_equal(tf._circle_mask(3), out)
  
imports: from __future__ import annotations
  from io import BytesIO
  import numpy
  import xarray
  import dask.array
  import PIL
  import pytest
  import datashader.transfer_functions
  from datashader.tests.test_pandas import assert_eq_ndarray, assert_eq_xr, assert_image_close
label_desc: Use image node_id 21 for calling a global function with example usage: test_masks() without return types