def same_neighbourhood_size(atom_index_1, molecule_1, atom_index_2, molecule_2):
    """ Checks whether the same atoms in two different molecules (e.g., reactant and product molecules) have the same
        neighbourhood size. """

    if len(molecule_1.GetAtomWithIdx(atom_index_1).GetNeighbors()) != \
            len(molecule_2.GetAtomWithIdx(atom_index_2).GetNeighbors()):
        return False
    return True