code: def linearization_error(nodes):
      
      if NO_IMAGES:
          return
  
      curve = bezier.Curve.from_nodes(nodes)
      line = bezier.Curve.from_nodes(nodes[:, (0, -1)])
      midpoints = np.hstack([curve.evaluate(0.5), line.evaluate(0.5)])
      ax = curve.plot(256)
      line.plot(256, ax=ax)
      ax.plot(
          midpoints[0, :], midpoints[1, :], color="black", linestyle="dashed"
      )
      ax.axis("scaled")
      save_image(ax.figure, "linearization_error.png")
docs: Image for :func:`.linearization_error` docstring.