Changed Python external method to a class