def bond_to_label(bond):
    """This function takes an RDKit bond and creates a label describing
    the most important attributes"""
    a1_label = str(bond.GetBeginAtom().GetAtomicNum())
    a2_label = str(bond.GetEndAtom().GetAtomicNum())
    if bond.GetBeginAtom().GetAtomMapNum():
        a1_label += str(bond.GetBeginAtom().GetAtomMapNum())
    if bond.GetEndAtom().GetAtomMapNum():
        a2_label += str(bond.GetEndAtom().GetAtomMapNum())
    atoms = sorted([a1_label, a2_label])
    return '{}{}{}'.format(atoms[0], bond.GetSmarts(), atoms[1])
