code: def test_mask():
      # test masks
  
      # check that using an empty mask is equivalent to not using a mask
      wc = WordCloud(random_state=42)
      wc.generate(THIS)
      mask = np.zeros(np.array(wc).shape[:2], dtype=int)
      wc_mask = WordCloud(mask=mask, random_state=42)
      wc_mask.generate(THIS)
      assert_array_equal(wc, wc_mask)
  
      # use actual nonzero mask
      mask = np.zeros((234, 456), dtype=int)
      mask[100:150, 300:400] = 255
  
      wc = WordCloud(mask=mask)
      wc.generate(THIS)
      wc_array = np.array(wc)
      assert mask.shape == wc_array.shape[:2]
      assert_array_equal(wc_array[mask != 0], 0)
      assert wc_array[mask == 0].sum() > 10000
  
imports: from wordcloud import WordCloud, get_single_color_func, ImageColorGenerator
  import numpy
  import pytest
  from random import Random
  from numpy.testing import assert_array_equal
  from PIL import Image
  import xml.etree.ElementTree
  import matplotlib
label_desc: Use image node_id 14 for calling a global function with example usage: test_mask() without return types