If this is a modding question and you have further questions about modding, please post in The Forge...specifically in the Modder's Q&A thread.
That said, I think you are looking for a module system operation? (A list of them can be found in header_operations.py Familiarize yourself with them and use that file as a reference)
If that is the case, you are looking for this operation, I believe:
(store_troop_faction,<destination>,<troop_id>),