updated python code to start linking method calls with their declarations