def fast_track(remaining, unit, seed, neighbours, elements):
    """
    If any of the neighbours found are in the list of elements "elements", fast
    -track them to unit list, such that they are not searched as "seed" atoms.
    Useful for e.g. one-coordinate atoms (often two organic molecules approach
    most closely via H-atoms, which might lead to the merging of two building
    units).

    Args
    ----
    remaining: set
        Set of atom indices still left to classify.

    unit: list
        List of atoms-images in building unit so far.

    seed: tuple
        Seed atom to search for neighbours (ix, image).

    neighbours:
        List of neighbouring atom indices to search over.

    elements:
        List of atomic symbols for elements that are being fast-tracked.
    """

    ft = []
    for a in range(len(neighbours)-1, -1, -1):
        if neighbours[a]["site"].specie.symbol in elements:
            ft.append(neighbours.pop(a))
    
    # Get index and image for the fast-tracked atoms.
    branchTips = [(a["site_index"], a["image"] + seed[1]) for a in ft]
    ix = {a[0] for a in branchTips}

    # Update the "remaining" set and the buildng unit list.
    unit += branchTips
    remaining -= ix

    return remaining, unit, neighbours