docs: def plot_margins(*, fig=None, inches=1., centers=True, edges=True):
      """Add lines onto a figure indicating the margins, centers, and edges.
  
      Useful for ensuring your figure design scripts work as intended, and for laying
      out figures.
  
      Parameters
      ----------
      fig : matplotlib.figure.Figure object (optional)
          The figure to plot onto. If None, gets current figure. Default is None.
      inches : float (optional)
          The size of the figure margin, in inches. Default is 1.
      centers : bool (optional)
          Toggle for plotting lines indicating the figure center. Default is
          True.
      edges : bool (optional)
          Toggle for plotting lines indicating the figure edges. Default is True.
      """
      if fig is None:
          fig = plt.gcf()
      size = fig.get_size_inches()  # [H, V]
      trans_vert = inches / size[0]
      left = matplotlib.lines.Line2D(
          [trans_vert, trans_vert], [0, 1], transform=fig.transFigure, figure=fig
      )
      right = matplotlib.lines.Line2D(
          [1 - trans_vert, 1 - trans_vert], [0, 1], transform=fig.transFigure, figure=fig
      )
      trans_horz = inches / size[1]
      bottom = matplotlib.lines.Line2D(
          [0, 1], [trans_horz, trans_horz], transform=fig.transFigure, figure=fig
      )
      top = matplotlib.lines.Line2D(
          [0, 1], [1 - trans_horz, 1 - trans_horz], transform=fig.transFigure, figure=fig
      )
      fig.lines.extend([left, right, bottom, top])
      if centers:
          vert = matplotlib.lines.Line2D(
              [0.5, 0.5], [0, 1], transform=fig.transFigure, figure=fig, c="r"
          )
          horiz = matplotlib.lines.Line2D(
              [0, 1], [0.5, 0.5], transform=fig.transFigure, figure=fig, c="r"
          )
          fig.lines.extend([vert, horiz])
      if edges:
          left = matplotlib.lines.Line2D(
              [0, 0], [0, 1], transform=fig.transFigure, figure=fig, c="k"
          )
          right = matplotlib.lines.Line2D(
              [1, 1], [0, 1], transform=fig.transFigure, figure=fig, c="k"
          )
          bottom = matplotlib.lines.Line2D(
              [0, 1], [0, 0], transform=fig.transFigure, figure=fig, c="k"
          )
          top = matplotlib.lines.Line2D([0, 1], [1, 1], transform=fig.transFigure, figure=fig, c="k")
          fig.lines.extend([left, right, bottom, top])