code: def test_streamplot_limits():
      ax = plt.axes()
      x = np.linspace(-5, 10, 20)
      y = np.linspace(-2, 4, 10)
      y, x = np.meshgrid(y, x)
      trans = mtransforms.Affine2D().translate(25, 32) + ax.transData
      plt.barbs(x, y, np.sin(x), np.cos(y), transform=trans)
      # The calculated bounds are approximately the bounds of the original data,
      # this is because the entire path is taken into account when updating the
      # datalim.
      assert_array_almost_equal(
          ax.dataLim.bounds, (20, 30, 15, 6), decimal=1
      )
  
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 10 for calling a global function with example usage: test_streamplot_limits() without return types