code: def test_trirefine_masked(interpolator):
      # Repeated points means we will have fewer triangles than points, and thus
      # get masking.
      x, y = np.mgrid[:2, :2]
      x = np.repeat(x.flatten(), 2)
      y = np.repeat(y.flatten(), 2)
  
      z = np.zeros_like(x)
      tri = mtri.Triangulation(x, y)
      refiner = mtri.UniformTriRefiner(tri)
      interp = interpolator(tri, z)
      refiner.refine_field(z, triinterpolator=interp, subdiv=2)
  
imports: import numpy
  from numpy.testing import assert_array_equal, assert_array_almost_equal, assert_array_less
  import numpy.ma.testutils
  import pytest
  import matplotlib
  import matplotlib.pyplot
  import matplotlib.tri
  from matplotlib.path import Path
  from matplotlib.testing.decorators import image_comparison, check_figures_equal
label_desc: Use image node_id 25 for calling a global function with example usage: test_trirefine_masked(interpolator) without return types