GEOFENCING in ArduPlane

Hello,
I want to create a GEOFENCE using python script? Any suggestions on how to do that?

Thank You,
Sripad