Hi Aravindan. I haven't personally done much work with manual path selection, but RTT Prober does. I'd suggest looking at it as an example...
https://bitbucket.org/ra_/tor-rtt/src/3a2ef9343d3054b8bcf37877d81d926400ed85...
relay_ip_addresses = ["10.0.0.21","10.0.0.22","10.0.0.23"]
circuit_id = controller.extend_circuit('0',relay_ip_addresses)
The circuit path should be relay fingerprints, not IP addresses...
https://stem.torproject.org/api/control.html#stem.control.Controller.extend_...
Cheers! -Damian