What is best way to batch mutate and avoid node duplication?

Oh, solved. uid = "_:XX". Having a code example for this will be better.