code: def test_sketch_params():
      fig, ax = plt.subplots(figsize=(3, 3))
      ax.set_xticks([])
      ax.set_yticks([])
      ax.set_frame_on(False)
      (handle,) = ax.plot([0, 1])
      handle.set_sketch_params(scale=5, length=30, randomness=42)
  
      with BytesIO() as fd:
          fig.savefig(fd, format="pgf")
          buf = fd.getvalue().decode()
  
      baseline = (
          r"""\pgfpathmoveto{\pgfqpoint{0.375000in}{0.300000in}}%
  \pgfpathlineto{\pgfqpoint{2.700000in}{2.700000in}}%
  \usepgfmodule{decorations}%
  \usepgflibrary{decorations.pathmorphing}%
  \pgfkeys{/pgf/decoration/.cd, """
          r"""segment length = 0.150000in, amplitude = 0.100000in}%
  \pgfmathsetseed{42}%
  \pgfdecoratecurrentpath{random steps}%
  \pgfusepath{stroke}%"""
      )
      # \pgfdecoratecurrentpath must be after the path definition and before the
      # path is used (\pgfusepath)
      assert baseline in buf
  
imports: import datetime
  from io import BytesIO
  import os
  import shutil
  import numpy
  from packaging.version import parse
  import pytest
  import matplotlib
  import matplotlib.pyplot
  from matplotlib.testing import _has_tex_package, _check_for_pgf
  from matplotlib.testing.exceptions import ImageComparisonFailure
  from matplotlib.testing.compare import compare_images
  from matplotlib.backends.backend_pgf import PdfPages
  from matplotlib.testing.decorators import _image_directories, check_figures_equal, image_comparison
  from matplotlib.testing._markers import needs_ghostscript, needs_pgf_lualatex, needs_pgf_pdflatex, needs_pgf_xelatex
label_desc: Use image node_id 18 for calling a global function with example usage: test_sketch_params() without return types