Actually that is how it works. Those are global variables and they can be used by the entire module system.
No, the stuff you've posted is all complete nonsense.
("draw_icons_deserters",
[
(try_for_parties, ":party"),
(store_faction_of_party, ":party_faction", ":party"),
(eq, ":party_faction", "fac_deserters"),
(store_party_size, ":num", ":party"),
(gt, ":num", 0),
(party_stack_get_troop_id, ":party_leader", ":party", 0),
(store_faction_of_troop, ":troop_faction", ":party_leader"),
(faction_get_slot, ":culture", ":troop_faction", slot_faction_culture),
(gt, ":culture", 0),
(assign, ":icon", -1),
(try_begin),
(eq, ":culture", "fac_culture_1"),
(try_begin),
(ge, ":num", 5),
(assign, ":icon", "icon_desertirs_germ"),
(else_try),
(assign, ":icon", "icon_desertirs_germ"),
(try_end),
(else_try),
(eq, ":culture", "fac_culture_2"),
(try_begin),
(ge, ":num", 5),
(assign, ":icon", "icon_desertirs_rus"),
(else_try),
(assign, ":icon", "icon_desertirs_rus"),
(try_end),
(try_end),
(gt, ":icon", -1),
(party_set_icon, ":party", ":icon"),
(try_end),
]
),
in module_simple_triggers.py