docs: def _get_bond_data(line):
          """
          Subroutine to extract bond label, site indices, and length from
          a LOBSTER header line. The site indices are zero-based, so they
          can be easily used with a Structure object.
  
          Example header line: No.4:Fe1->Fe9(2.4524893531900283)
          Example header line for orbtial-resolved COHP:
              No.1:Fe1[3p_x]->Fe2[3d_x^2-y^2](2.456180552772262)
  
          Args:
              line: line in the COHPCAR header describing the bond.
  
          Returns:
              Dict with the bond label, the bond length, a tuple of the site
              indices, a tuple containing the orbitals (if orbital-resolved),
              and a label for the orbitals (if orbital-resolved).
          """
  
          orb_labs = ["s", "p_y", "p_z", "p_x", "d_xy", "d_yz", "d_z^2",
                      "d_xz", "d_x^2-y^2", "f_y(3x^2-y^2)", "f_xyz",
                      "f_yz^2", "f_z^3", "f_xz^2", "f_z(x^2-y^2)", "f_x(x^2-3y^2)"]
  
          line = line.rsplit("(", 1)
          # bondnumber = line[0].replace("->", ":").replace(".", ":").split(':')[1]
          length = float(line[-1][:-1])
  
          sites = line[0].replace("->", ":").split(":")[1:3]
          site_indices = tuple(int(re.split(r"\D+", site)[1]) - 1
                               for site in sites)
  
          # species = tuple(re.split(r"\d+", site)[0] for site in sites)
          if "[" in sites[0]:
              orbs = [re.findall(r"\[(.*)\]", site)[0] for site in sites]
              orbitals = [tuple((int(orb[0]), Orbital(orb_labs.index(orb[1:]))))
                          for orb in orbs]
              orb_label = "%d%s-%d%s" % (orbitals[0][0], orbitals[0][1].name,
                                         orbitals[1][0], orbitals[1][1].name)
  
          else:
              orbitals = None
              orb_label = None
  
          # a label based on the species alone is not feasible, there can be more than one bond for each atom combination
          # label = "%s" % (bondnumber)
  
          bond_data = {"length": length, "sites": site_indices,
                       "orbitals": orbitals, "orb_label": orb_label}
          return bond_data