Access the SETx card that is stored in model.sets. Depending on the type of SETx card (there is no "SET" card), take a look at the classes in pyNastran.bdf.cards.bdf_sets and look at the data members that are stored in the class. Then write a loop to move the nodes based on the IDs.
How you know those are nodes vs. elements depends on context, so I can't give a clear answer without a more concrete example. The GUI uses SETx cards to link to SPLINEx cards and draw CAEROx subpanel IDs for control surfaces, so you can't just look at the SETx card.