code: def test_pyplot_up_to_date(tmp_path):
      pytest.importorskip("black")
  
      gen_script = (
          Path(mpl.__file__).parents[2] / "tools/boilerplate.py"
      )
      if not gen_script.exists():
          pytest.skip("boilerplate.py not found")
      orig_contents = Path(plt.__file__).read_text()
      plt_file = tmp_path / "pyplot.py"
      plt_file.write_text(orig_contents, "utf-8")
  
      subprocess_run_for_testing(
          [sys.executable, str(gen_script), str(plt_file)], check=True
      )
      new_contents = plt_file.read_text("utf-8")
  
      if orig_contents != new_contents:
          diff_msg = "\n".join(
              difflib.unified_diff(
                  orig_contents.split("\n"),
                  new_contents.split("\n"),
                  fromfile="found pyplot.py",
                  tofile="expected pyplot.py",
                  n=0,
                  lineterm="",
              )
          )
          pytest.fail(
              "pyplot.py is not up-to-date. Please run "
              "'python tools/boilerplate.py' to update pyplot.py. "
              "This needs to be done from an environment where your "
              "current working copy is installed (e.g. 'pip install -e'd). "
              "Here is a diff of unexpected differences:\n%s" % diff_msg
          )
  
imports: import difflib
  import numpy
  import sys
  from pathlib import Path
  import pytest
  import matplotlib
  from matplotlib.testing import subprocess_run_for_testing
  from matplotlib import pyplot
label_desc: Use image node_id 1 for calling a global function with example usage: test_pyplot_up_to_date(tmp_path) without return types