Extended PyFunction example