def bond_to_label(bond):
    """
    This function takes an RDKit bond and creates a label describing
    the most important attributes.

    Parameters
    ----------
    bond: rdkit.Chem.Bond
        RDKit bond.

    Returns
    -------
    label: str
        Label of bond.
    """

    a1_label = str(bond.GetBeginAtom().GetAtomicNum())
    a2_label = str(bond.GetEndAtom().GetAtomicNum())
    if bond.GetBeginAtom().HasProp("molAtomMapNumber"):
        a1_label += bond.GetBeginAtom().GetProp("molAtomMapNumber")
    if bond.GetEndAtom().HasProp("molAtomMapNumber"):
        a2_label += bond.GetEndAtom().GetProp("molAtomMapNumber")
    atoms = sorted([a1_label, a2_label])

    label = "{}{}{}".format(atoms[0], bond.GetSmarts(), atoms[1])

    return label