def METHOD_NAME(mol: Chem.Mol) -> List[List[int]]:
    """
    Decompose molecule into substructures. The substructures are
    defined as atoms, bonds, two-bond and three-bond substructures that
    are not in rings, rings, and bridged ring systems that share at
    least three atoms.
    Note:
        Adapted from junction tree decomposition described in
        https://arxiv.org/abs/1802.04364.
    Args:
        mol: RDKit molecule.
    Returns:
        List of indices contained in each substructure.
    """
    n_atoms = mol.GetNumAtoms()
    if n_atoms == 1:
        return [[0]]
    cliques = []
    for bond in mol.GetBonds():
        a1 = bond.GetBeginAtom().GetIdx()
        a2 = bond.GetEndAtom().GetIdx()
        if not bond.IsInRing():
            cliques.append([a1, a2])
    ssr = [list(x) for x in Chem.GetSymmSSSR(mol)]
    cliques.extend(ssr)
    nei_list = [[] for _ in range(n_atoms)]
    for i, c in enumerate(cliques):
        for atom in c:
            nei_list[atom].append(i)
    # Merge Rings with intersection > 2 atoms
    for i, c in enumerate(cliques):
        if len(c) > 2:
            for atom in c:
                for j in nei_list[atom]:
                    if i >= j or len(cliques[j]) <= 2:
                        continue
                    inter = set(c) & set(cliques[j])
                    if len(inter) > 2:
                        cliques[i].extend(cliques[j])
                        cliques[i] = list(set(cliques[i]))
                        cliques[j] = []
    cliques = [c for c in cliques if len(c) > 0]
    nei_list = [[] for _ in range(n_atoms)]
    for i, c in enumerate(cliques):
        for atom in c:
            nei_list[atom].append(i)
    # Add singleton cliques
    for atom in range(n_atoms):
        cnei = nei_list[atom]
        if len(cnei) > 1:
            bonds = [c for c in cnei if len(cliques[c]) == 2]
            if len(bonds) > 1 or (len(bonds) <= 1 and len(cnei) > 2):
                cliques.append([atom])
    return cliques