code: def test_linewidth():
      X, Y, U, V = velocity_field()
      speed = np.hypot(U, V)
      lw = 5 * speed / speed.max()
      ax = plt.figure().subplots()
      ax.streamplot(
          X, Y, U, V, density=[0.5, 1], color="k", linewidth=lw
      )
  
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 5 for calling a global function with example usage: test_linewidth() without return types