how to use guide mode and remote control together (dronekit python)

I want to use the guide mode. In order for the drone to fly to the target automatically And I want to use the remote during the flight To control and avoid obstacles I’m writing a script using Dronkit python. What do I have to do? please