code: def build_pyplot(pyplot_path):
      pyplot_orig = pyplot_path.read_text().splitlines(keepends=True)
      try:
          pyplot_orig = pyplot_orig[
              : pyplot_orig.index(PYPLOT_MAGIC_HEADER) + 1
          ]
      except IndexError as err:
          raise ValueError(
              "The pyplot.py file *must* have the exact line: %s"
              % PYPLOT_MAGIC_HEADER
          ) from err
  
      with pyplot_path.open("w") as pyplot:
          pyplot.writelines(pyplot_orig)
          pyplot.writelines(boilerplate_gen())
  
      # Run black to autoformat pyplot
      subprocess.run(
          [
              sys.executable,
              "-m",
              "black",
              "--line-length=88",
              pyplot_path,
          ],
          check=True,
      )
  
imports: import ast
  from enum import Enum
  import functools
  import inspect
  from inspect import Parameter
  from pathlib import Path
  import sys
  import subprocess
  import numpy
  from matplotlib import _api, mlab
  from matplotlib.axes import Axes
  from matplotlib.backend_bases import MouseButton
  from matplotlib.figure import Figure
label_desc: Use image node_id 4 for calling a global function with example usage: build_pyplot(pyplot_path) without return types