How to generate defects (atom exchanges) using pymatgen

Hello everybody!

I usually use pymatgen to substitute atoms in a structure for other atoms (i.e. 25% subtitution of Mn by Ni in LiMn2O4 generating the different structures of LiMn1.5Ni0.5O4). This time I would like to exchange atoms in one structure (i.e. In LiMn1.5Ni0.5O4 put a percentage of Ni in tetrahedral position and Li in octahedral position, while normally they are the other way around).

After many trials i get a syntax error using:
subtrans = SubstitutionTransformation({“Li”: {“Li”: 8./8, “Ni”: 8./20}}, “Ni”: {“Li”: 8./8, “Ni”: 8./20}})
or
subtrans = SubstitutionTransformation({“Li”: {“Li”: 0.5, “Ni”: 0.5}}, “Ni”: {“Li”: 0.5, “Ni”: 0.5}})
I also tried to add the charge to the atoms like:
subtrans = SubstitutionTransformation({“Li+”: {“Li”: 8./8, “Ni”: 8./20}}, “Ni3+”: {“Li”: 8./8, “Ni”: 8./20}})

Does anybody know how to do it?

Thanks!

Iciar