code: def test_sine_plus_noise():
      np.random.seed(0)
      x = (
          np.sin(np.linspace(0, np.pi * 2.0, 50000))
          + np.random.uniform(size=50000) * 0.01
      )
  
      fig, ax = plt.subplots()
      p1 = ax.plot(x, solid_joinstyle="round", linewidth=2.0)
  
      # Ensure that the path's transform takes the new axes limits into account.
      fig.canvas.draw()
      path = p1[0].get_path()
      transform = p1[0].get_transform()
      path = transform.transform_path(path)
      simplified = path.cleaned(simplify=True)
  
      assert simplified.vertices.size == 25240
  
imports: import base64
  import io
  import numpy
  from numpy.testing import assert_array_almost_equal, assert_array_equal
  import pytest
  from matplotlib.testing.decorators import check_figures_equal, image_comparison, remove_ticks_and_titles
  import matplotlib.pyplot
  from matplotlib import patches, transforms
  from matplotlib.path import Path
label_desc: Use image node_id 8 for calling a global function with example usage: test_sine_plus_noise() without return types