docs: def add_arrow(
          self,
          index,
          between,
          kind,
          label="",
          head_length=0.1,
          head_aspect=2,
          font_size=14,
          color="k",
      ):
          """Add an arrow to the WMEL diagram.
  
          Parameters
          ----------
          index : integer
              The interaction, or start and stop interaction for the arrow.
          between : 2-element iterable of integers
              The inital and final state of the arrow
          kind : {'ket', 'bra'}
              The kind of interaction.
          label : string (optional)
              Interaction label. Default is empty string.
          head_length: number (optional)
              size of arrow head
          font_size : number (optional)
              Label font size. Default is 14.
          color : matplotlib color (optional)
              Arrow color. Default is black.
  
          Returns
          -------
          [line,arrow_head,text]
          """
          if hasattr(index, "index"):
              x_pos = list(index)
          else:
              x_pos = [index] * 2
          x_pos = [np.linspace(0, 1, self.interactions)[i] for i in x_pos]
  
          # calculate arrow length
          arrow_length = self.energies[between[1]] - self.energies[between[0]]
          arrow_end = self.energies[between[1]]
          if arrow_length > 0:
              direction = 1
              y_poss = [self.energies[between[0]], self.energies[between[1]] - head_length]
          elif arrow_length < 0:
              direction = -1
              y_poss = [self.energies[between[0]], self.energies[between[1]] + head_length]
          else:
              raise ValueError("between invalid!")
  
          length = abs(y_poss[0] - y_poss[1])
          if kind == "ket":
              line = self.ax.plot(x_pos, y_poss, linestyle="-", color=color, linewidth=2, zorder=9)
          elif kind == "bra":
              line = self.ax.plot(x_pos, y_poss, linestyle="--", color=color, linewidth=2, zorder=9)
          elif kind == "out":
              yi = np.linspace(y_poss[0], y_poss[1], 100)
              xi = (
                  np.sin((yi - y_poss[0]) * int((1 / length) * 20) * 2 * np.pi * length) / 40
                  + x_pos[0]
              )
              line = self.ax.plot(
                  xi, yi, linestyle="-", color=color, linewidth=2, solid_capstyle="butt", zorder=9
              )
          else:
              raise ValueError("kind is not 'ket', 'out', or 'bra'.")
          # add arrow head
          arrow_head = self.ax.arrow(
              x_pos[1],
              arrow_end - head_length * direction,
              0,
              0.0001 * direction,
              head_width=head_length * head_aspect,
              head_length=head_length,
              fc=color,
              ec=color,
              linestyle="solid",
              linewidth=0,
              zorder=10,
          )
          # add text
          text = self.ax.text(
              np.mean(x_pos), -0.15, label, fontsize=font_size, horizontalalignment="center"
          )
          return line, arrow_head, text