Brune network synthesis in python