How can I repeat a group of animation phases
Does it need to be programmatic? If not, select one of the objects, select the keyframes (in the graph editor) in frames 1-300: 


Hit Shift+D to duplicate the keyframes
Then hit G and 300 
Then Enter to confirm the operation


This will duplicate the exact keyframe in 1-300 and move the duplicates to 301-600.

If it is more complicated than that, perhaps you might update your question with more details on exactly what you are attempting to accomplish.