def select_nodes_multi(molecules, selector):
    """
    Find the nodes that correspond to a selector among multiple molecules.

    Runs a selector over multiple molecules. The selector must be a function
    that takes a node dictionary as argument and returns ``True`` if the node
    should be selected. The selection is yielded as tuples of a molecule indice
    from the molecule list input, and a key from the molecule.

    Parameters
    ----------
    molecule: collections.abc.Iterable[Molecule]
        A list of molecules.
    selector: collections.abc.Callable
        A selector function.

    Yields
    ------
    tuple[int, collections.abc.Hashable]
        Molecule/key identifier for the selected nodes.
    """
    for molecule_idx, molecule in enumerate(molecules):
        for key, node in molecule.nodes.items():
            if selector(node):
                yield molecule_idx, key
