Returning from python func