code: def test_masks_and_nans():
      X, Y, U, V = velocity_field()
      mask = np.zeros(U.shape, dtype=bool)
      mask[40:60, 80:120] = 1
      U[:20, :40] = np.nan
      U = np.ma.array(U, mask=mask)
      ax = plt.figure().subplots()
      with np.errstate(invalid="ignore"):
          ax.streamplot(X, Y, U, V, color=U, cmap=plt.cm.Blues)
  
file_path: matplotlib/lib/matplotlib/tests/test_streamplot.py
imports: import numpy
  from numpy.testing import assert_array_almost_equal
  import pytest
  import matplotlib.pyplot
  from matplotlib.testing.decorators import image_comparison
  import matplotlib.transforms
label_desc: Use image node_id 6 for calling a global function with example usage: test_masks_and_nans() without return types