def METHOD_NAME(bonds, indices):
    """Returns bonds between atoms at given indices."""
    iset = set(indices)
    bonds = [bond for bond in bonds if bond[0] in iset and bond[1] in iset]
    if bonds:
        newindices = np.zeros(indices.max()+1, int)
        newindices[indices] = np.arange(len(indices))
        return newindices[np.array(bonds)]