How to control operating channel by python

Hello community!
We are doing project which coordinator send data router 1, and router1 send data router2 (it was like ad-hoc network),
After receiving data from coordinator, we change router 1 to coordinator for sending data.
However, in the process, operating channel changed unintentionally.
Therefore, we cannot connect router1 and router2.(router1 could not find router2 as remote device.)
How can we solve this problem on python?

What Digi product are yuu working with?

I working with XBee2c.