signed_networks: structural_balance: metrics: faction: main.py refactoring